File: php.xml.patch

package info (click to toggle)
haskell-skylighting-core 0.14.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,440 kB
  • sloc: xml: 118,808; haskell: 3,117; cs: 72; ada: 67; java: 37; ansic: 32; cpp: 31; php: 25; tcl: 19; lisp: 14; perl: 11; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 802 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/skylighting-core/xml/php.xml b/skylighting-core/xml/php.xml
index 063bb96..87a1fdd 100644
--- a/skylighting-core/xml/php.xml
+++ b/skylighting-core/xml/php.xml
@@ -10911,7 +10911,8 @@
     </list>
 
     <contexts>
-      <context name="start" lineEndContext="#stay" attribute="Normal Text">
+      <!-- JGM:  Added fallthrough so it will handle snippets that don't begin with <?php -->
+       <context name="start" lineEndContext="#stay" attribute="Normal Text" fallthrough="true" fallthroughContext="phpsource">
         <StringDetect context="phpsource" attribute="Keyword" String="&lt;?php" insensitive="true" />
         <Detect2Chars context="phpsource" attribute="Keyword" char="&lt;" char1="?" />
         <Detect2Chars attribute="Keyword" context="#pop" char="?" char1="&gt;" />