Skip to content

Conversation

@sadasant
Copy link

I've been using this line to fix the one line links:

syn region mkdLink matchgroup=mkdDelimiter start="<\(https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,50 }\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*\)\@="  end=">" oneline contains=@Spell skipwhite

Also, the syntax gets messy when there's code inside lists, like this:

  • A list.
    Yep.
Woah code!

So I did this:

syn match  mkdBlockCode  /^\(^\S.*\n\)\@<=\n\(^\(\s\{4}\|\t\).*\n\)\+/
syn match  mkdBlockCode  /^\(^\s\{4}\S.*\n\)\@<=\n\(^\(\s\{8}\|\t\{2}\).*\n\)\+/
syn match  mkdBlockCode  /^\(^\s\{8}\S.*\n\)\@<=\n\(^\(\s\{12}\|\t\{3}\).*\n\)\+/

Which is enough for a 3 depth list, I wonder if there's a workaround for any depth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant