"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/erb.lang" (12 May 2020, 743 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "erb.lang": 3.53_vs_3.54.

    1 
    2 Description="ERB Templates"
    3 
    4 Categories = {"template"}
    5 
    6 Keywords={
    7   { Id=1,
    8     Regex=[[ <\%[\=#]?(?!#) ]],
    9     Group=0,
   10   }
   11 }
   12 
   13 Strings={
   14   Delimiter=[["]],
   15   Escape=[[\A(?!x)x]]
   16   -- see http://stackoverflow.com/questions/1723182/a-regex-that-will-never-be-matched-by-anything
   17 }
   18 
   19 
   20 -- Issue with %> also ending the Ruby nested sections
   21 --Comments={
   22 --  { Block=true,
   23 --    Nested=false,
   24 --    Delimiter= { [[<\%\#]],[[\%>]] }
   25 --  }
   26 --}
   27 
   28 NestedSections = {
   29 
   30   { Lang="ruby", Delimiter= { [[<%[=]?]], [[%>]] } },
   31 }
   32 
   33 IgnoreCase=true
   34 
   35 function OnStateChange(oldState, newState, token, groupID)
   36 
   37   if token=="%>"  and newState==HL_EMBEDDED_CODE_END and oldState==HL_BLOCK_COMMENT then
   38     return HL_BLOCK_COMMENT_END
   39   end
   40 
   41   return newState
   42 end