"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/plugins/outhtml_add_line.lua" (12 May 2020, 738 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lua source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 --[[
    2 Sample plugin file for highlight
    3 
    4 Adds a line to the left of the code box
    5 ]]
    6 
    7 Description="Adds a line to the left of the code box in HTML output"
    8 
    9 Categories = {"format", "html" }
   10 
   11 -- function to update theme definition
   12 -- optional parameter: theme description
   13 function themeUpdate()
   14 
   15   if (HL_OUTPUT == HL_FORMAT_HTML or HL_OUTPUT == HL_FORMAT_XHTML) then
   16     Injections[#Injections+1]="pre.hl, ol.hl { padding-left: 1em; border-left: 5px solid "..Keywords[1].Colour..";}"
   17   end
   18 
   19 end
   20 
   21 
   22 --The Plugins array assigns code chunks to themes or language definitions.
   23 --The chunks are interpreted after the theme or lang file were parsed,
   24 --so you can refer to elements of these files
   25 
   26 Plugins={
   27 
   28   { Type="theme", Chunk=themeUpdate }
   29 
   30 }