Basic changes-package support.

Thu, 25 Jun 2020 15:11:15 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Thu, 25 Jun 2020 15:11:15 -0500
changeset 26
c8a6390ebc58
parent 25
08aa7e744f79
child 27
f34b09beada4

Basic changes-package support.
(\replaced does not do second argument yet. Not sure if it is even feasible.)

syntaxes/LaTeX.tmLanguage.json file | annotate | diff | comparison | revisions
--- a/syntaxes/LaTeX.tmLanguage.json	Fri May 29 16:24:55 2020 -0500
+++ b/syntaxes/LaTeX.tmLanguage.json	Thu Jun 25 15:11:15 2020 -0500
@@ -1031,6 +1031,78 @@
       ]
     },
     {
+      "begin": "((\\\\)(?:added|replaced))((?:\\[[^\\[]*?\\])*)(\\{)",
+      "beginCaptures": {
+        "1": {
+          "name": "support.function.changes.added.latex"
+        },
+        "2": {
+          "name": "punctuation.definition.function.latex"
+        },
+        "3": {
+          "patterns": [
+            {
+              "include": "#optional-arg"
+            }
+          ]
+        },
+        "4": {
+          "name": "punctuation.definition.changes.added.begin.latex"
+        }
+      },
+      "contentName": "entity.name.changes.added.latex",
+      "end": "\\}",
+      "endCaptures": {
+        "0": {
+          "name": "punctuation.definition.changes.added.end.latex"
+        }
+      },
+      "patterns": [
+        {
+          "include": "text.tex#braces"
+        },
+        {
+          "include": "$base"
+        }
+      ]
+    },
+    {
+      "begin": "((\\\\)deleted)((?:\\[[^\\[]*?\\])*)(\\{)",
+      "beginCaptures": {
+        "1": {
+          "name": "support.function.changes.deleted.latex"
+        },
+        "2": {
+          "name": "punctuation.definition.function.latex"
+        },
+        "3": {
+          "patterns": [
+            {
+              "include": "#optional-arg"
+            }
+          ]
+        },
+        "4": {
+          "name": "punctuation.definition.changes.deleted.begin.latex"
+        }
+      },
+      "contentName": "entity.name.changes.deleted.latex",
+      "end": "\\}",
+      "endCaptures": {
+        "0": {
+          "name": "punctuation.definition.changes.deleted.end.latex"
+        }
+      },
+      "patterns": [
+        {
+          "include": "text.tex#braces"
+        },
+        {
+          "include": "$base"
+        }
+      ]
+    },
+    {
       "begin": "((\\\\)emph)(\\{)",
       "beginCaptures": {
         "1": {

mercurial