-
Notifications
You must be signed in to change notification settings - Fork 39
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
fix(text): Render list items correctly #1137
base: main
Are you sure you want to change the base?
Conversation
I think it's worth trying to change things such that generatiing
we generate
Unless that breaks the intended fix for the rfc-to-be. |
What is better about that superfluous empty line? (You can probably have one if you want with |
Look at it in context with the rest of the nested xml2rfc/tests/valid/elements.bom.text Lines 366 to 458 in fdb6fb8
<li> and <ol> at xml2rfc/tests/input/elements.xml Lines 472 to 473 in fdb6fb8
|
I have converted PR to a draft. |
@@ -1092,6 +1093,7 @@ Unnumbered section | |||
* Indent="5". “The heaviest penalty for declining to rule is to | |||
be ruled by someone inferior to yourself.” Πολιτεία | |||
|
|||
* |
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.
And now this is perhaps unfortunate. What we've uncovered is, I think, a decision to special case the rendering of nested lists without leading text that doesn't generalize to all possible uses of such things, and we're just toggling cross the edges of that earlier decision.
Has the previous side-effect of no leading marker been used in this case previously? Is it ok to make this change (since getting the behavior of that side-effect is possible in better defined ways, I _think)?
@cabo - what do you think the right thing to do with this is?
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.
Here's a list of RFCs that has ul
tag inside a li
as first element:
rfc8668.xml
rfc8742.xml
rfc8811.xml
rfc8793.xml
rfc8927.xml
rfc8677.xml
rfc8667.xml
rfc8698.xml
rfc9195.xml
All these use empty="true"
in parent ul
, so no new *
gets added but there's a bug in the suggested fix because it adds a new line. I'll fix that.
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.
@cabo - what do you think the right thing to do with this is?
I don't think it is ever correct to add a new line that the author didn't want.
If it is needed, the author can put it in, but it never should be forced on them.
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.
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.
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.
And HTML has the marker, so the text should too - that convinces me that (except for the newline that Carsten doesn't want) the current proposed change is right.
So people looking at this later can see it in context, could you also paste the section of html analogous to the 4. 4.1
change in the text in this thread?
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.
@rjsparks ol
has a new line in HTML output:
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.
Fixes #1135
Fixes #1138
See changes made in 3712523 for context.
This change can affect if
ol
is used inside ali
as the first element and theli
element is inside anotherol
element.I could not find any published RFCs with XML that match the above condition.
These are the RFCs that I found that use
ol
as the first element inli
:I didn't notice any changes in text output due to this change. But there are a few minor changes (with spacing) due to changes over the years.