"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/markdown.lang" (12 May 2020, 915 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 "markdown.lang": 3.53_vs_3.54.

    1 Description="GitHub Flavored Markdown"
    2 
    3 Categories = {"markup", "two-pass"}
    4 
    5 Keywords={
    6   { Id=1,
    7     Regex=[[^##?#?#?#?#?.+]],
    8   },
    9   { Id=2,
   10     Regex=[[(\[.+?\])\(http]],
   11   },
   12   { Id=3,
   13     Regex=[[\(http.+?\) ]],
   14   },
   15   --needs to be placed before kwd 4
   16   { Id=1,
   17     Regex=[[ ^\-{3,} ]],
   18   },
   19   { Id=1,
   20     Regex=[[ ^\={3,} ]],
   21   },
   22   { Id=4,
   23     Regex=[[ ^\s*(\-|\*|>) ]],
   24   },
   25 }
   26 
   27 Strings={
   28   Delimiter=[[```|`]]
   29 }
   30 
   31 IgnoreCase=false
   32 
   33 --KeywordFormatHints={
   34 --    {
   35     --Id=1,
   36     --Bold=true,
   37     --Italic=true,
   38     --Underline=true
   39 --    }
   40 --}
   41 
   42 -- if highlight is called with --two-pass, this handler will save all lines
   43 -- preceeding header lines as range with keyword ID 1
   44 function OnStateChange(oldState, newState, token, kwgroup, lineNumber, column)
   45   if newState==HL_KEYWORD and kwgroup==1 and token[0]~='#' and lineNumber>1 then
   46     AddPersistentState(lineNumber-1, kwgroup, column, #token)
   47   end
   48 end