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

fix front_matter_delimiter type #257

Merged
merged 6 commits into from
Oct 12, 2023
Merged

fix front_matter_delimiter type #257

merged 6 commits into from
Oct 12, 2023

Conversation

noraj
Copy link
Contributor

@noraj noraj commented Oct 3, 2023

fix #256

With the fix, restores expected behavior

require 'commonmarker'

Commonmarker.to_html("---\nyaml: true\nage: 42\n---\n# Title 1", options: { extension: { front_matter_delimiter: '---' } } )
# => "<h1>Title 1</h1>\n"

Note, the extension is still stripping anchors tho.

Commonmarker.to_html("---\nyaml: true\nage: 42\n---\n# Title 1" )
# => "<hr />\n<h2><a href=\"#yaml-true-age-42\" aria-hidden=\"true\" class=\"anchor\" id=\"yaml-true-age-42\"></a>yaml: true<br />\nage: 42</h2>\n<h1><a href=\"#title-1\" aria-hidden=\"true\" class=\"anchor\" id=\"title-1\"></a>Title 1</h1>\n"

@noraj noraj marked this pull request as draft October 3, 2023 20:48
@noraj noraj marked this pull request as ready for review October 3, 2023 21:11
@gjtorikian
Copy link
Owner

Nice find, thank you! There are a couple of dependency updates I need to make, but when I do, I will release a version with this fix included.

@gjtorikian
Copy link
Owner

Ah, unfortunately another frontmatter test failed, and this might require a deeper look into the Rust side of things. Would you be able to do that?

@noraj
Copy link
Contributor Author

noraj commented Oct 5, 2023

For the Rust side, I fear not.

@gjtorikian
Copy link
Owner

Got you. I'll try to take a look over the next few days.

@gjtorikian
Copy link
Owner

Thanks for your patience and contribution. This will go out as 1.0.0.pre11.

@gjtorikian gjtorikian merged commit 692e5c1 into gjtorikian:main Oct 12, 2023
11 checks passed
@noraj noraj deleted the patch-1 branch October 13, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Front-matter delimiter type
2 participants