"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/plugins/outhtml_add_figure.lua" (12 May 2020, 681 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. See also the last Fossies "Diffs" side-by-side code changes report for "outhtml_add_figure.lua": 3.53_vs_3.54.

    1 
    2 Description="Adds figure and figcapture in HTML output. Define capture as plug-in parameter."
    3 
    4 Categories = {"format", "html" }
    5 
    6 function syntaxUpdate(desc)
    7   if (HL_OUTPUT ~= HL_FORMAT_HTML and HL_OUTPUT ~= HL_FORMAT_XHTML) then
    8     return
    9   end
   10   HeaderInjection="<figure class=\"hl\"><figcaption>"..HL_PLUGIN_PARAM.."</figcaption>\n"
   11   FooterInjection="\n</figure>"
   12 end
   13 
   14 function themeUpdate(desc)
   15   if (HL_OUTPUT == HL_FORMAT_HTML or HL_OUTPUT == HL_FORMAT_XHTML) then
   16 
   17     Injections[#Injections+1]=[[
   18 figure.hl {
   19   margin-left: 0px;
   20   color: ]]..Default.Colour..[[;
   21 }
   22   ]]
   23   end
   24 end
   25 
   26 Plugins={
   27   { Type="lang", Chunk=syntaxUpdate },
   28   { Type="theme", Chunk=themeUpdate },
   29 }