Commit Graph

15 Commits

Author SHA1 Message Date
Kai Maetzel
37cffbd031 Merge pull request #11066 from eklavyamirani/master
Fixed: Markdown syntax highlighting to support alternative header styles
2016-09-26 17:44:21 -07:00
Matt Bierner
0b70faeec6 Fix colorization of markdown links and inlines inside of lists and quotes
Issue #12344

**Bug**
Current colorization rules are too relaxed. Links inside lists of block quotes for example end up getting colored differently than normal links.

**Fix**
- Add a scope to the textmate markdown grammar so that we can identify the symbol that starts a list or quote.
- Remove text colorization rule for lists and quotes since this just duplicates the normal text color.
- Only apply special puctuator colorization to the start symbol for lists and quotes
2016-09-26 10:50:58 -07:00
Matt Bierner
93d16ef30a Fix colorization for markdown indented paragraphs
Issue #8264

**Bug**
Indented paragraphs are not highlighted in markdown files. Up to three spaces are allowed before the first non space character.

**Fix**
Add rule to consume optional spaces before paragrpah start.

closes #8264
2016-09-26 10:49:47 -07:00
Matt Bierner
265c025bbf Use blankline to delimit html block in markdown colorization
**Bug**
Issue #7725

Nested html is not colorized properly for markdown:

```md
<div class="custom-class" markdown="1">
  <div>
    nested div
  </div>
</div>
```

**Fix**
According to the commonmark spec, general html blocks end with a blank line: http://spec.commonmark.org/0.25/#html-blocks

This change relaxes the while so that we only check for blanklines, instead of trying to match the start tag (which fails when nesting elements)
2016-09-26 10:48:54 -07:00
Matt Bierner
102adb766e Also support any number of spaces after end of closing fenced code block 2016-09-26 10:47:31 -07:00
Matt Bierner
69f2e874fc Fix Markdown Colorization for Fenced Code Blocks When End Fence Is Prefixed by Spaces
Issue #8636

**Bug**
Fenced code block closing tags break colorization if they are prefixed with spaces. According to the commonmark spec, up to three spaces are allowed.

**Fix**
Update defintion of fenced code block closing tag to support spaces.

Closes #8636
2016-09-26 10:47:31 -07:00
Matt Bierner
90d58f4909 Fix colorization of html prefixed by spaces in markdown files
Issue #12289

**Bug**
Html tags prefixed by 1 to 4 spaces are not colorized properly

**Fix**
Consume optional leading whitespace when matching html tags instead of only starting from previous match location

closes #12289
2016-09-26 10:46:00 -07:00
Matt Bierner
5169a9806a Add Syntax Highlighting for C# Code in Markdown files
Adds c# to the list of language highlighted in markdown fenced code blocks. You must have a c# language extension install for this to work.

Closes #7003
2016-09-26 10:44:14 -07:00
Eklavya Mirani
2e886c0708 fixed broken markdown tests. 2016-08-28 23:20:58 +05:30
Eklavya Mirani
9aff1d0f74 Added the --- seperator to the paragraph rule
to allow heading-setext.2 rule to be recognized
2016-08-28 16:31:02 +05:30
Eklavya Mirani
45fbd00dd5 Moved TM Markdown seperator rule below the Paragraph
rule to fix the alt heading 2 syntax highlighting.
2016-08-27 13:55:51 +05:30
rebornix
c958b5cb37 Fix #6113 2016-06-20 17:42:20 +08:00
kieferrm
2ac170e64e fix hygiene issues 2016-06-14 15:01:58 +02:00
kieferrm
ed5eb10f9e paragraphs stop at list item boundaries 2016-06-14 15:01:58 +02:00
kieferrm
0b856de5a7 prepackage markdown extension 2016-06-14 15:01:58 +02:00