From 75508fe9e8d6a936aea70de0a435f581820774b3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 17 May 2013 09:58:24 -0700 Subject: [PATCH] Allow more than 3 back ticks for fenced code blocks --- src/packages/gfm/grammars/gfm.cson | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/packages/gfm/grammars/gfm.cson b/src/packages/gfm/grammars/gfm.cson index 988c457f0..d8c5d2826 100644 --- a/src/packages/gfm/grammars/gfm.cson +++ b/src/packages/gfm/grammars/gfm.cson @@ -54,80 +54,80 @@ 'name': 'comment.hr.gfm' } { - 'begin': '^```coffee(script)?$' + 'begin': '^`{3,}coffee(script)?$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.code.coffee.gfm' 'patterns': ['include': 'source.coffee'] } { - 'begin': '^```(javascript|js)$' + 'begin': '^`{3,}(javascript|js)$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.code.js.gfm' 'patterns': ['include': 'source.js'] } { - 'begin': '^```css$' + 'begin': '^`{3,}css$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.code.css.gfm' 'patterns': ['include': 'source.css'] } { - 'begin': '^```xml$' + 'begin': '^`{3,}xml$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.code.xml.gfm' 'patterns': ['include': 'text.xml'] } { - 'begin': '^```(ruby|rb)$' + 'begin': '^`{3,}(ruby|rb)$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.code.ruby.gfm' 'patterns': ['include': 'source.ruby'] } { - 'begin': '^```java$' + 'begin': '^`{3,}java$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.code.java.gfm' 'patterns': ['include': 'source.java'] } { - 'begin': '^```(sh|bash)$' + 'begin': '^`{3,}(sh|bash)$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.code.shell.gfm' 'patterns': ['include': 'source.shell'] } { - 'begin': '^```.*$' + 'begin': '^`{3,}.*$' 'beginCaptures': '0': 'name': 'support.gfm' - 'end': '^```$' + 'end': '^`{3,}$' 'endCaptures': '0': 'name': 'support.gfm' 'name': 'markup.raw.gfm'