hashmd icon indicating copy to clipboard operation
hashmd copied to clipboard

support for codefence code highlight for common languages

Open sanvishal opened this issue 3 years ago • 2 comments

I was trying to figure out why the codefencing does not work on js though I've set fencedCodeBlockHighlighting: true in the editorConfig, looks like there are only certain languages that support code fence highlighting, is it possible to add highlighting for any language inside codefence? or is it possible to modify the CodeMirror object to add custom modes?

image

thanks!

sanvishal avatar Jul 06 '22 14:07 sanvishal

is it possible to modify the CodeMirror object to add custom modes

Sure, see the example here: https://github.com/bytedance/bytemd/pull/192#issuecomment-1140437569

pd4d10 avatar Jul 10 '22 06:07 pd4d10

thanks, but codemirror only allows to define the modes when creating the codemirror instance. (I think, I'm not sure)

is it possible to add extra modes after codemirror instance creation?

sanvishal avatar Jul 10 '22 13:07 sanvishal

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Sep 09 '22 02:09 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Sep 16 '22 02:09 github-actions[bot]