liquid_feedback_frontend

diff env/util/wysihtml_preproc.lua @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/env/util/wysihtml_preproc.lua	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -0,0 +1,12 @@
     1.4 +local function normalize_whitespace(str)
     1.5 +  str = string.gsub(str, "\194\160", " ")
     1.6 +  str = string.gsub(str, " ", " ")
     1.7 +  return str
     1.8 +end
     1.9 +
    1.10 +function util.wysihtml_preproc(str)
    1.11 +  str = string.gsub(str, "<a>(.-)</a>", "%1")
    1.12 +  str = string.gsub(str, "<[ou]l>[^<>]*", normalize_whitespace)
    1.13 +  str = string.gsub(str, "</li>[^<>]*", normalize_whitespace)
    1.14 +  return str
    1.15 +end

Impressum / About Us