[gtksourceview] sweave.lang: some fixes



commit f3eb99ec87ce120e9add885ad0df54fac6b77094
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Feb 8 15:08:31 2014 +0100

    sweave.lang: some fixes
    
    The R-block context is not included into another context containing an
    <end> tag, so "extend-parent" is useless.
    
    "style-inside" is also useless, because no style is applied to the whole
    context, the styles are applied to the different components (start, end,
    the R code).

 data/language-specs/sweave.lang |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/data/language-specs/sweave.lang b/data/language-specs/sweave.lang
index b2b2589..8369688 100644
--- a/data/language-specs/sweave.lang
+++ b/data/language-specs/sweave.lang
@@ -31,19 +31,19 @@
   <styles>
     <style id="comment"            _name="Comment"    map-to="latex:comment"/>
     <style id="command"            _name="Command"    map-to="latex:command"/>
-    <style id="verbatim"           _name="Command"    map-to="latex:verbatim"/>
+    <style id="verbatim"           _name="Verbatim"   map-to="latex:verbatim"/>
   </styles>
 
   <definitions>
     <context id="inline-R">
-      <match>(\\Sexpr)(\{)([^\}]*)(\})</match>
-        <include>
+      <match>(\\Sexpr)\{([^\}]*)\}</match>
+      <include>
         <context sub-pattern="1" style-ref="command"/>
-        <context sub-pattern="3" style-ref="verbatim"/>
+        <context sub-pattern="2" style-ref="verbatim"/>
       </include>
     </context>
 
-    <context id="R-block" extend-parent="false" style-inside="true">
+    <context id="R-block">
       <start>^&lt;&lt;.*&gt;&gt;=</start>
       <end>@</end>
       <include>


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