-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no paragraph tags when list is tight #22071
Conversation
f6a3c58
to
ad8c640
Compare
The writers should always be able to check its parent item as well, so it could be a part of the x = List(items=[Paragraph(x), ...])
y = MD(); push!(y.content, x.items[1]) should "just work" and In Documenter we could have a separate |
Okay, yeah I'm making design decisions here based on insufficient knowledge about Markdown in general and the implementation. I just want to get the issue fixed and hammering until I get the output I want :P. One of the problems is that there are two writers (one in Base and one in Documenter) and the data structure has to satisfy both. In Documenter the function |
Well, I think the easiest thing would be to simply update the writers everywhere. 😄 We probably can't get around that -- I have the impression that currently everything basically assumes loose lists. Could you say what you envision the structure of the
|
Side note: I'm familiar with the writer code in Documenter, but I have only given a cursory glance at the code in Base. That's kind of why I'm "appealing to higher ideals", rather than proposing code. It would actually be great to document / spec out all the objects in |
Updated to let writers take a |
574e0e6
to
5fa3faa
Compare
5fa3faa
to
9ab792e
Compare
@@ -250,8 +250,10 @@ end | |||
mutable struct List | |||
items::Vector{Any} | |||
ordered::Int # `-1` is unordered, `>= 0` is ordered. | |||
isloose::Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just loose
since it's a property and not a predicate function?
Bump, what can I do here? I find the large distance between the list items somewhat of a fork in my eye... |
Any objections to removing the
looks like this (numbers enumerate the
The |
Should we try to get this in before 0.6 by the way to make sure the lists display nicely in the docs? Would this type of change even be accepted for 0.6 backporting at this stage? |
I tried my best to get it working with the approach you suggested and it was pretty easy to fix the html writer. The other ones where more annoying though and I couldn't afford to spend more time on it. Having the extra field in the paragraph and leave all the writers in Base as is would not change any functionality but at least provide an rescale hatch just for Documenter.jl. I'll try upload what I had as a WIP. |
This and JuliaDocs/Documenter.jl#493 should fix #21922
I interpret CommonMarks:
as that it is the rendering of the paragraphs that should be changed based on the context (in a tight list or not). Easiest way to get that context to the Paragraph-writer was through an extra field.