[gtksourceview] bibtex.lang: add string context for bib(la)tex values
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] bibtex.lang: add string context for bib(la)tex values
- Date: Fri, 16 Jun 2017 09:27:24 +0000 (UTC)
commit b36d20bb1deef4e241acaf21f66d638e78fe7ef5
Author: Schrieveslaach <info schrieveslaach de>
Date: Tue Jun 13 15:58:26 2017 +0200
bibtex.lang: add string context for bib(la)tex values
https://bugzilla.gnome.org/show_bug.cgi?id=762990
data/language-specs/bibtex.lang | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/bibtex.lang b/data/language-specs/bibtex.lang
index 2e760cf..725b97b 100644
--- a/data/language-specs/bibtex.lang
+++ b/data/language-specs/bibtex.lang
@@ -30,6 +30,7 @@
<styles>
<style id="entry-type" _name="Entries" map-to="def:keyword"/>
<style id="field" _name="Field" map-to="def:identifier"/>
+ <style id="string" _name="String" map-to="def:string"/>
</styles>
<default-regex-options case-sensitive="false"/>
@@ -96,11 +97,23 @@
<keyword>year</keyword>
</context>
+ <context id="string" class-disabled="no-spell-check">
+ <match extended="true">
+ =\s*(\{.*?\})|(".*?")
+ </match>
+
+ <include>
+ <context sub-pattern="1" style-ref="string" class="string"/>
+ <context sub-pattern="2" style-ref="string" class="string"/>
+ </include>
+ </context>
+
<context id="bibtex">
<include>
<context ref="latex:latex"/>
<context ref="entry-type"/>
<context ref="field"/>
+ <context ref="string"/>
</include>
</context>
</definitions>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]