[gtksourceview/cherry-pick-2ed88221] Merge branch 'master' into 'master'
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/cherry-pick-2ed88221] Merge branch 'master' into 'master'
- Date: Tue, 21 Jul 2020 18:19:44 +0000 (UTC)
commit 25789c7f0a8461c04f1dc75d614834da3ff646ca
Author: Christian Hergert <christian hergert me>
Date: Tue Jul 21 18:17:22 2020 +0000
Merge branch 'master' into 'master'
latex.lang: add style for name of class, package and environment
See merge request GNOME/gtksourceview!156
(cherry picked from commit 2ed8822168db6177c885c5dd7373795ec516851f)
8536d1be latex.lang: add style for name of class, package and environment
data/language-specs/latex.lang | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/data/language-specs/latex.lang b/data/language-specs/latex.lang
index c91ea1246..cfde1ef1f 100644
--- a/data/language-specs/latex.lang
+++ b/data/language-specs/latex.lang
@@ -34,6 +34,9 @@
<style id="inline-math" name="Inline Math Mode" map-to="latex:display-math"/>
<style id="math" name="Math Mode" map-to="latex:display-math"/>
<style id="math-boundary" name="Math Boundary" map-to="latex:display-math"/>
+ <style id="class-name" name="Document class name" map-to="def:text"/>
+ <style id="pkg-name" name="Package name" map-to="def:text"/>
+ <style id="env-name" name="Environment name" map-to="def:text"/>
<style id="include" name="Include" map-to="def:keyword"/>
<style id="common-commands" name="Command" map-to="def:keyword"/>
<style id="command" name="Command" map-to="def:keyword"/>
@@ -355,23 +358,26 @@
<context id="specific-commands">
<include>
<context id="documentclass" class="no-spell-check">
- <match>(\\documentclass)(\[.*\])?(\{.*\})?</match>
+ <match>(\\documentclass)(\[.*\])?(\{(.*)\})?</match>
<include>
<context sub-pattern="1" style-ref="common-commands"/>
+ <context sub-pattern="4" style-ref="class-name"/>
</include>
</context>
<context id="include" class="no-spell-check">
- <match>(\\(input|include|includeonly|usepackage))\b(\[.*\])?(\{.*\})?</match>
+ <match>(\\(input|include|includeonly|usepackage))\b(\[.*\])?(\{(.*)\})?</match>
<include>
<context sub-pattern="1" style-ref="include"/>
+ <context sub-pattern="5" style-ref="pkg-name"/>
</include>
</context>
<context id="begin-end-command" class="no-spell-check">
- <match>(\\(begin|end))\{.*\}</match>
+ <match>(\\(begin|end))\{(.*)\}</match>
<include>
<context sub-pattern="1" style-ref="common-commands"/>
+ <context sub-pattern="3" style-ref="env-name"/>
</include>
</context>
</include>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]