-
-
Notifications
You must be signed in to change notification settings - Fork 436
Add InlineCode
option for inline code blocks
#618
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
Conversation
Forgot to ping @bep and @kaushalmodi |
@alecthomas Have you made any decision on this? If you don't want to add Just tell me what to do when you've decided. |
Oh sorry, I spaced on this. LGTM! Fix the merge conflicts and we'll get it in. |
- Add an `InlineCode` option for inline code blocks - When `PreventSurroundingPre` option is enabled, do not wrap the code by `Line` and `CodeLine` - Write and update related tests
+1 Thanks for following up on this. |
@bep not sure if you want to pull this in too, it's tagged as v2.2.0 |
The change to |
The behaviour of `PreventSurroundingPre` has changed in alecthomas/chroma#618 so that apparently it now causes line wrapper tags to be no longer emitted, but we need some form of indication to split the HTML into lines, so I did what yuin/goldmark-highlighting#33 did and added the `nopWrapper`. Maybe there are more elegant solutions but for some reason, just splitting the HTML string on `\n` did not work. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
I don't remember the reason now, but that's probably why I asked:
And nobody gave any feedback. Unrelated to this, I'm a bit curious why people don't want the What do you think @alecthomas? |
We render our own |
For that The question about the correct behavior of |
Yeah, I agree, |
So I think the best course of action would be to split the behaviour into two options:
For consistency, there should also probably be a per-line wrapper options for people to supply their custom wrapper, e.g.
|
InlineCode
option for inline code blocks, which wraps the code incode
tag and doesn't wrap the code byLine
andCodeLine
PreventSurroundingPre
option is enabled, do not wrap the code byLine
andCodeLine
line
CSSdisplay: flex;
creating a problem if we want to inline a code snippet #617Please test and review if this behavior is desired and correct.
Specially
PreventSurroundingPre
, is everyone OK with this behavior?