vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

Update snippet importing syntax to look more markdownish

Open brc-dd opened this issue 3 years ago • 2 comments

The syntax from markdown-it-vuepress-code-snippet-enhanced looks more markdown-like and extendable (I saw you have noticed that @brc-dd ), so I chose to implement it in vuepress-next (not as powerful as that plugin though).

Anyway, the <<< syntax has being always marked as beta in VuePress v1 (link), so we could still consider changing it.

Originally posted by @meteorlxy in https://github.com/vuejs/vitepress/issues/875#issuecomment-1178450949

brc-dd avatar Jul 23 '22 14:07 brc-dd

I totally agree with you. Neovim highlights the "<<<" as syntax error for some reason, moreover specifying a VSCode region alongside with a language (e.g. @/source/component.vue#props{typescript}) doesn't seem to work.

minenwerfer avatar Jul 24 '22 16:07 minenwerfer

moreover specifying a VSCode region alongside with a language (e.g. @/source/component.vue#props{typescript}) doesn't seem to work.

That language thing was added recently, so its not in the latest release yet. It works fine though:

image

brc-dd avatar Jul 24 '22 16:07 brc-dd