-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove UseSoftlineBreakAsHardlineBreak from MarkdownParser #510
base: main
Are you sure you want to change the base?
Conversation
This change ensures that soft line breaks are no longer treated as hard line breaks during markdown parsing. It enhances compatibility with standard markdown behavior .
Introduces a new `soft_line_endings` configuration option to control line break behavior in Markdown parsing. When enabled, soft line endings are converted to hard HTML breaks (`<br />`). Updated relevant parser logic and documentation to reflect this addition.
Well that was fast 😅. I'll check this out and test against docs-content later today! |
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.
Fantastic news! Thanks for making this happen--and so quickly!
So I must be doing something wrong. I don't notice any differences in the output when testing this against docs-content. I also tried to write a script that diffs the HTML output of building with this change vs building without this change. After correcting for changes in edit_this_page links, the HTML diff is empty. Does that sound possible? |
@bmorelli25 it sounds possible to me - the reason why this change is relatively safe is because the migration tool imported paragraphs as lines, and put hard line breaks between paragraphs, and we as writers just kept following the pattern. consider trying to point it at a branch that you have altered to have the "problematic" content, e.g.
overkill explanation and examplescurrent behavior
becomes ![]() and
becomes ![]() what we want is
to be ![]() and
to be ![]() going to quickly regex again for this case - when I did it before, the only lines sitting directly beside each other were inside of code blocks (which this change does not impact). |
yep, quick scan shows we only have consecutive lines of text in:
used none of these would be impacted by this change afaik |
This change ensures that soft line breaks are no longer treated as hard line breaks during markdown parsing. It enhances compatibility with standard markdown behavior.
This implements the request made here: #343
This should align better with how writers write as per: https://asciidoctor.org/docs/asciidoc-recommended-practices/#one-sentence-per-line
NOTE this is high impactful on
asciidocalypse
anddocs-content
.Introduces a new
soft_line_endings
configuration option todocset.yml
control line break behavior in Markdown parsing. When enabled, soft line endings are converted to hard HTML breaks (<br />
).NOTE: The new default of this config option is
false
so won't turn soft enters in the markdown to hard breaks in the HTML.cc @karenzone @shainaraskas