@ 261105.1

191030.2.1.3 · ab639e1b7412fa09f5302cf3cfcfbabef883cf6b

EditorConfig: Lua

Enforce consistent code styles for all Lua files (.lua, .lang, .theme):

* Indent: 2 spaces.
* Trim trailing whitespace.
* Insert final new line.
* UTF-8 encoding.

Manually fix all scripts that didn't pass EClint validation (256 files).

reading declarations

Changes to plugins/outhtml_add_background_stripes.lua. All files

plugins/outhtml_add_background_stripes.lua

@@ -11,12 +11,12 @@ Categories = {"format", "html" } -- function to update theme definition -- optional parameter: theme description function themeUpdate()-  +   function lighten(colour)     if string.match(colour, "#%x+")==nil then       return "rgba(0,0,0,0)"     end-    +     base_rr = ("0x"..string.match(colour, "%x%x", 2))     base_gg = ("0x"..string.match(colour, "%x%x", 4))     base_bb = ("0x"..string.match(colour, "%x%x", 6))@@ -24,7 +24,7 @@ function themeUpdate()     min_bright=math.min(base_rr, base_gg, base_bb)     max_bright=math.max(base_rr, base_gg, base_bb)     brightness = (min_bright + max_bright) / (255*2.0)-    +     if (brightness < 0.1) then       return "rgba(50,50,50, 0.5)"     elseif (brightness < 0.5) then@@ -34,11 +34,11 @@ function themeUpdate()     else       percent = 80     end-    +     rr = math.floor(base_rr * (100 + percent) / 100 )     gg = math.floor(base_gg * (100 + percent) / 100 )     bb = math.floor(base_bb * (100 + percent) / 100 )-    +     if (rr>255) then rr = 255 end     if (gg>255) then gg = 255 end     if (bb>255) then bb = 255 end@@ -46,11 +46,11 @@ function themeUpdate()   end    if (HL_OUTPUT == HL_FORMAT_HTML or HL_OUTPUT == HL_FORMAT_XHTML) then-    +     -- inspired by prismjs ;)     Injections[#Injections+1]="pre.hl { background-image: linear-gradient(transparent 50%, "..lighten(Canvas.Colour)..-			      " 50%); background-size:3em 3em; background-origin:content-box; font-size:100%/1.5;line-height: 1.5; }"-  end +      " 50%); background-size:3em 3em; background-origin:content-box; font-size:100%/1.5;line-height: 1.5; }"+  end end  --The Plugins array assigns code chunks to themes or language definitions.