Sublime Forum

Link highlighting disappeared in Markdown

#1

This is a potentially very dumb question, but I can’t seem to figure out what’s happened.

I’m using MarkdownEditing for Markdown syntax highlighting, with the colour scheme Monokai Extended. After upgrading to ST4 yesterday, everything seems to be working just fine except link highlighting:

(Normally, the text between square brackets should be blue and underlined.)

At the same time, when I look at Monokai Extended.tmTheme, it seems like the link highlighting should be working just fine:

<dict>
  <key>name</key>
  <string>Markdown: Link</string>
  <key>scope</key>
  <string>string.other.link.title.markdown</string>
  <key>settings</key>
  <dict>
    <key>fontStyle</key>
    <string>underline</string>
    <key>foreground</key>
    <string>#66d9ef</string>
  </dict>
</dict>

Anyone got an idea of what could be the problem?

Thanks!

0 Likes

#2

The descript of a link has a scope of text.html.markdown meta.paragraph.markdown meta.link.inline.description.markdown now. You can press ctrl+alt+shift+p to check the scope at the first caret posiiton.

0 Likes

#3

Thanks a lot! Took me a bit to figure out how it works — but it’s fixed now. :slight_smile:

0 Likes

#4

Just to document it in case someone’s having a similar issue, I’ve ended up adding this rule to Monokai Extended.sublime-color-scheme:

		{
            "name": "Markdown link",
            "scope": "text.html.markdown meta.paragraph.markdown meta.link.inline.description.markdown - punctuation",
            "foreground": "#66d9ef",
            "font_style": "underline"
        },
0 Likes

#5

Usually you don’t have to be that specific, meta.link.inline.description.markdown - punctuation should be enough. Or maybe a little more general meta.link.inline.description - punctuation.

0 Likes

#6

Thanks, will try that! (This is the first time I’m dealing with this.)

0 Likes

#7

This issue is not related with ST4 update.

It’s rather MarkdownEditing, which changed scope for link descriptions. The reason is documented in the linked issue.

1 Like