-
Notifications
You must be signed in to change notification settings - Fork 327
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
Add Multi-line Dictionary Definition (<dd>) rows. #3129
Conversation
Expands the existing syntax to allow/expect the option of multiple definitions by adding any number of ``` :: Definition``` to an a DT/DD set.
Fixes syntax highlighting to account for multiple definitions on a definition list.
Before going further with this, I think we need to have a little more discussion about where this syntax would actually be used. As I mentioned in this comment #2340 (comment), there was a specific use case we identified for the single-line syntax we currently use. I don't think we have any use case identified for multiple As another note, this PR unfortunately breaks existing |
I'm not spotting this?
Do you mean the linebreak between the close of the <dt> and the open of the first <dd> ? |
Weird. That is not what I remember to be the correct behavior for a DD/DT pair but it's been a spell. :) |
Remove the linbreak between the </dt> and the first <dd>
Updated to allow multiple definition terms and definitions per term <Term>::<definition> <Term>::<definition1>::<definition2> ::<definition3> ``` **Example** :: ::V3 uses HTML *definition lists* to create "lists" with hanging indents. ::Three I'm a term::Four **<u>Hello</u>**::I\'m a different ::List : ```
This looks good! I'm just going to go through and see if the logic can be shortened up at all, then merge. |
@calculuschild Is the multiline regression from your work or did I miss it? |
It's just a new test I added today for an edge case we missed. Pretty sure I know where the fix is though. I'm planning to merge it in just a bit. |
Okay. The fail I'm seeing is indeed a fail that worked at last I remember.
|
No, it was broken before. It comes from this test which was written with bad syntax:
This should output:
I added an extra newline between the Terms to correct that test, then added this new test which just changes |
Yeah, that seems right. |
Split into two extensions as single-line and multiline are different syntaxes. Simplified a lot of logic and probably cleaner as their own NPM packages (eventually).
Thanks @dbolack-ab ! 💯 ⭐ 🎉 I found more edge cases, but it turns out just splitting each syntax into its own extension solved everything. And then I realized that let me simplify a lot too as a bonus. |
Expands the existing syntax to allow/expect the option of multiple definitions by adding any number of
:: Definition
to an a DT/DD set.Solves #2340.
Final Syntax and Behavior
This has been updated to a multi-description ( DD ) mode that can take multi-line input. This mode expects the term on one line, the description(s) on lines after, then a blank line before a new term. Two blank lines terminate the list.
This cannot be mixed with the existing inline style definition lists.
Example:
Test case Brew at: https://homebrewery.naturalcrit.com/share/h-sHSQsRyUlz