[gtksourceview/gnome-3-24] markdown.lang: add support for blocks of code (three back-ticks)



commit 564cf3dceec92a71bad5c4cfbd17219c169313dc
Author: Ole Christian Eidheim <eidheim gmail com>
Date:   Sat Jul 7 09:07:42 2018 +0000

    markdown.lang: add support for blocks of code (three back-ticks)

 data/language-specs/markdown.lang | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/data/language-specs/markdown.lang b/data/language-specs/markdown.lang
index 2ee8fbf4..9a46d365 100644
--- a/data/language-specs/markdown.lang
+++ b/data/language-specs/markdown.lang
@@ -160,6 +160,11 @@
       <match>(?&lt;!`)``[^`]+((`|`{3,})[^`]+)*``(?!`)</match>
     </context>
 
+    <context id="3-backticks-code-span" class="no-spell-check" style-ref="code">
+      <start>^```.*$</start>
+      <end>^```$</end>
+    </context>
+
     <!-- Example:
          > Quoted text.
          > Quoted text with `code span`.
@@ -175,6 +180,7 @@
         <context sub-pattern="1" where="start" style-ref="blockquote-marker"/>
         <context ref="1-backtick-code-span"/>
         <context ref="2-backticks-code-span"/>
+        <context ref="3-backticks-code-span"/>
         <context ref="automatic-link"/>
         <context ref="inline-link"/>
         <context ref="reference-link"/>
@@ -371,6 +377,7 @@
         <context ref="code-block"/>
         <context ref="1-backtick-code-span"/>
         <context ref="2-backticks-code-span"/>
+        <context ref="3-backticks-code-span"/>
         <context ref="blockquote"/>
         <context ref="automatic-link"/>
         <context ref="inline-link"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]