Expose code fence attributes to SyntaxHighlighterAdapter::write_highlighted #473
hongquan
started this conversation in
Feature requests
Replies: 1 comment 1 reply
-
@hongquan I probably misunderstand what you're trying to do. But if you're using your own syntax highlighter, then you don't need to use the Syntect component at all. That is what we do - we use a Ruby syntax highlighter and enable the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building my personal blog, which let admin to write content in Markdown. The blog is about programming so highliting code block is important. But because the Comrak + Syntect combo is not strong enough, I want to create a flexible SyntaxHighlighterAdapter which can highlight code block with Syntect, or defer to client side, where I use Shiki. To let this adapter know which side (server or client) to do the job, will add some extra attribute to code fence, like if it encounters:
It will let client side to do. But to do that, I need
SyntaxHighlighterAdapter::write_highlighted
to be passed theattributes: HashMap<String, String>
likewrite_code_tag
andwrite_pre_tag
.Could the API be changed?
Beta Was this translation helpful? Give feedback.
All reactions