sublime-markdown-extended icon indicating copy to clipboard operation
sublime-markdown-extended copied to clipboard

using --- automatically trigger yaml syntax even if there was no ` or ```yaml

Open oriSomething opened this issue 10 years ago • 2 comments

normal text here

---
everything here is  a yaml syntax

it's a problem because --- is used as a separator.

by the way, thanks! this project makes markdown usable in sublime text

oriSomething avatar May 14 '15 10:05 oriSomething

yeah this was a pain initially, I tried to find a compromise but it seems to be a no-win scenario from an implementation standpoint - well, more of a tradeoff...

Since --- is commonly used in front matter - jekyll, assemble, metalsmith, verb, etc, and front matter is used for data, IMHO it's better to err on the side of providing a better experience for users who need to see their data highlighted, versus a separator. Because of this, I personally use ***, instead of---`. It works the same and everyone wins.

That said, I'm totally open to a solution that distinguishes front-matter from other separators in ST. I'm by no means an expert

jonschlinkert avatar May 14 '15 13:05 jonschlinkert

but maybe there is a hack, the ability to chose what languages supported manually. than we can disable the problematic languages when they're not being used. also it might be helpful, so we can use built in languages support for this scope. (not sure if it's supported but i believe it is):

{
 "javascript": "js",
 "python": "python"
 ...
}

oriSomething avatar May 14 '15 13:05 oriSomething