Skip to content
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

Align Renderer more with CommonMark Spec #18

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

stefanzweifel
Copy link
Owner

Related to #17.

This PR tries to align the package a bit more to the CommonMark spec.

For fun, I've taken the sample.md from thephpleague/commonmark and written a small test that compares input and output.
For convenience, the output is stored to disk for easier comparison in a local file editor.

Some things I noticed

  • ThematicBreakRenderer: Currently just returns --- as the commonmark-package itself doesn't store which characters were used to create the thematic break (eg. *** or * * *)
  • Adding line-breaks \n in random places feels icky

I've fixed some of the "issues" I noticed when comparing sample.md and sample-result.md in Sublime Text on my local machine.

I would like to spend my time on some different projects in the next few weeks, and will leave the underlying issue open for others to contribute to. (Will probably merge this PR, so the fixes added here make it into the next release)

@stefanzweifel stefanzweifel added enhancement New feature or request help wanted Extra attention is needed changelog:changed labels Nov 21, 2023
@stefanzweifel stefanzweifel self-assigned this Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:changed enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant