-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Respect node settings when rendering #10
Comments
This issue seems to be more complex than I thought. 😐 In #11 I've fixed Ignoring
I need some more head-space to tackle this. And the package definitely needs a better test-suite. The current tests have all been inspired by the league/commonmark suite, but it always felt a bit too unit-testy for me. |
Regarding the HTML block, here's the commonmark spec: https://spec.commonmark.org/0.30/#html-blocks I haven't tested to see if, for example, |
Closing since all of the identified items have been resolved - outstanding issues such as nested lists already have GitHub issues to track. |
As discussed in #9, various nodes have additional data explaining how they are intended to be rendered. For example, the fenced code node tells you its offset (indent), what delimiter character to use, and how many of that delimiter character should be used.
In some cases respecting this data will be useful only in that you're more likely to match the output to the given input - but in other cases ignoring that data can result in invalid (or at least incorrect) markdown. There's some examples of that in the above linked PR.
I've identified the following as not using the properties available when rendering nodes:
StrongRenderer
- ignoresdelimiter
Update Strong and Emphasis Renderers to use settings available in AST Node #11EmphasisRenderer
- ignoresdelimiter
Update Strong and Emphasis Renderers to use settings available in AST Node #11HtmlBlockRenderer
- ignorestype
IndentedCodeRenderer
- doesn't actually render an indented code block - it's rendering a fenced code block - Fix rendering of indented code block #15ListBlockRenderer
- ignoresisTight
; ignoresdelimiter
,padding
,bulletChar
,markerOffset
,start
fromListData
- ReworkListBlockRenderer
andListItemRenderer
to respect node settings #12ListItemRenderer
- ignoresListData
(but maybe that's okay, sinceListData
is partially handled inListBlockRenderer
?) - ReworkListBlockRenderer
andListItemRenderer
to respect node settings #12The text was updated successfully, but these errors were encountered: