-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Support for single backtick code blocks #140
Comments
I made that change and we agreed with @colinodell to use single backticks for single lines and three backticks for multiple lines. To be honest I can't find anywhere in the specs that allows this ¯\_(ツ)_/¯ Maybe we should rollback if the aim of the project is to be 100% aligned with the Commonmark spec. FYI, you're link is outdated. Latest version is 0.28: http://spec.commonmark.org/0.28/ |
@andreskrey No problem I'm sure that my wishes don't need to influence an entire project ;) I just noticed that that particular change wasn't reflected in other libraries such as the cebe/markdown implementation. All good though, that's why we can extend most markdown parsers I guess. Perhaps there could be a configuration option? We would much rather use the official repo than have to fork. |
Single backticks are valid - these represent inline "code spans": http://spec.commonmark.org/0.28/#code-spans However, there's nothing in the spec that says a single line of code must (or should) be represented by an inline code span - that's really just a preference we've implemented in #102. I'm not opposed to making this a configuration option :) |
The code places a single backtick for a code block on a single line, however in the spec I cannot find an example of this. The single backtick is not being interpreted correctly by cebe/markdown as it is expecting 3 backticks.
Can someone please link me to the relevant spec and paragraph that outlines the use of a single backtick is accepted markdown as per this spec? http://spec.commonmark.org/0.27/#fenced-code-blocks
html-to-markdown/src/Converter/PreformattedConverter.php
Line 46 in 7f98188
The text was updated successfully, but these errors were encountered: