[lfs-patches] r3633 - trunk/syntax-highlighting

ken at higgs.linuxfromscratch.org ken at higgs.linuxfromscratch.org
Tue Sep 5 11:31:33 PDT 2017


Author: ken
Date: Tue Sep  5 11:31:32 2017
New Revision: 3633

Log:
Fix build failure in syntax-highlighting-5.37.0 with pcre2.

Added:
   trunk/syntax-highlighting/
   trunk/syntax-highlighting/syntax-highlighting-5.37.0-upstream_fixes-1.patch

Added: trunk/syntax-highlighting/syntax-highlighting-5.37.0-upstream_fixes-1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/syntax-highlighting/syntax-highlighting-5.37.0-upstream_fixes-1.patch	Tue Sep  5 11:31:32 2017	(r3633)
@@ -0,0 +1,88 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2017-09-05
+Initial Package Version: 5.37.0
+Upstream Status: Applied
+Origin: Upstream
+Description: fixes build with pcre2
+
+commit ad077e4045e650e1708b6c81d33a14f4a9c99a5d
+Author: Heiko Becker <heirecka at exherbo.org>
+Date:   Wed Aug 23 12:28:52 2017 +0200
+
+    Escape hyphen in rest.xml regular expressions
+    
+    Summary:
+    The unescaped hyphen caused a build failure with pcre2-10.30 due to a broken
+    regex: 'syntax-highlighting/data/syntax/rest.xml" line 27 broken regex:
+    "^\\s*\\.\\. [w-_\\.]+::(\\s|$)" problem: "range out of order in character
+    class" at offset 12'.
+    
+    The pcre2pattern documentation says this:
+    
+    "Perl treats a hyphen as a literal if it appears before or after a POSIX class
+    (see below) or before or after a character type escape such as as \d or \H.
+    However, unless the hyphen is the last character in the class, Perl outputs a
+    warning in its warning mode, as this is most likely a user error. As PCRE2 has
+    no facility for warning, an error is given in these cases."
+    
+    Test Plan:
+    cmake && make && make test works fine pcre2-10.30, quick look at
+    http://docutils.sourceforge.net/FAQ.txt in kate seems fine.
+    
+    Reviewers: #framework_syntax_hightlighting, kfunk
+    
+    Subscribers: #frameworks
+    
+    Tags: #frameworks
+    
+    BUG: 383632
+    
+    Differential Revision: https://phabricator.kde.org/D7478
+
+diff --git a/data/syntax/rest.xml b/data/syntax/rest.xml
+index 1363965..ccfd08a 100644
+--- a/data/syntax/rest.xml
++++ b/data/syntax/rest.xml
+@@ -11,7 +11,7 @@
+   Copyright 2010 Matt Williams (matt at milliams.com)
+   Copyright 2014 Matthew Woehlke (mw_triad at users.sourceforge.net)
+   -->
+-<language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="2" kateversion="2.4" casesensitive="1">
++<language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="3" kateversion="2.4" casesensitive="1">
+ 
+   <highlighting>
+ 
+@@ -24,11 +24,11 @@
+         <RegExpr attribute="Citation" context="#stay" String="^\s*\.\. \[[&SimpleReferenceNameChars;]+\]\s" minimal="true" column="0"/>
+         <RegExpr attribute="HyperlinkTarget" context="#stay" String="^\s*(\.\. (__:|_[&SimpleReferenceNameChars; ]+:(\s|$))|__ )" minimal="true" column="0"/>
+         <RegExpr attribute="Code" String="^\s*\.\. code-block::" context="CodeBlock" column="0"/>
+-        <RegExpr attribute="Directive" context="#stay" String="^\s*\.\. [\w-_\.]+::(\s|$)" minimal="true" column="0"/>
++        <RegExpr attribute="Directive" context="#stay" String="^\s*\.\. [\w\-_\.]+::(\s|$)" minimal="true" column="0"/>
+         <RegExpr attribute="Code" String="::$" context="CodeBlock" />
+         <RegExpr attribute="SubstitutionDefinition" context="#stay" String="^\s*\.\. \|[&SimpleReferenceNameChars; ]+\|\s+[&SimpleReferenceNameChars;]+::\s" minimal="true" column="0"/>
+         <RegExpr attribute="Field" String=":(?=([^:]*\\:)*[^:]*:(\s|$))" context="Field" firstNonSpace="true"/>
+-        <RegExpr attribute="Comment" context="Comment" String="^(\s*)\.\.\s(?![\w-_\.]+::(\s|$))" column="0"/>
++        <RegExpr attribute="Comment" context="Comment" String="^(\s*)\.\.\s(?![\w\-_\.]+::(\s|$))" column="0"/>
+       </context>
+ 
+       <context name="InlineMarkup" attribute="Normal" lineEndContext="#stay">
+@@ -38,8 +38,8 @@
+         <RegExpr attribute="FootnoteReference" context="#stay" String="&inlinestart;\[[&SimpleReferenceNameChars;]+\]_&inlineend;" minimal="true"/>
+         <RegExpr attribute="HyperlinkReference" context="#stay" String="&inlinestart;`[^\s].*`_&inlineend;" minimal="true"/>
+         <RegExpr attribute="HyperlinkReference" context="#stay" String="&inlinestart;\w+_&inlineend;" minimal="true"/>
+-        <RegExpr attribute="InterpretedText" context="TrailingRole" String="&inlinestart;`[^\s].*`(?=:[\w-_\.\+]+:)" minimal="true"/>
+-        <RegExpr attribute="Role" String=":[\w-_\.\+]+:(?=`)" context="Role"/>
++        <RegExpr attribute="InterpretedText" context="TrailingRole" String="&inlinestart;`[^\s].*`(?=:[\w\-_\.\+]+:)" minimal="true"/>
++        <RegExpr attribute="Role" String=":[\w\-_\.\+]+:(?=`)" context="Role"/>
+       </context>
+ 
+       <context name="Field" attribute="Field" lineEndContext="#stay">
+@@ -56,7 +56,7 @@
+         <DetectChar attribute="InterpretedText" char="`" context="#pop!InterpretedText" />
+       </context>
+       <context name="TrailingRole" attribute="Role" lineEndContext="#pop">
+-        <RegExpr attribute="Role" String=":[\w-_\.\+]+:" context="#pop"/>
++        <RegExpr attribute="Role" String=":[\w\-_\.\+]+:" context="#pop"/>
+       </context>
+       <context name="Comment" attribute="Comment" lineEndContext="#stay" dynamic="true">
+         <RegExpr attribute="Code" String="^%1   " context="#stay" column="0" dynamic="true"/>


More information about the patches mailing list