liquid_feedback_frontend

diff env/encode/highlight.lua @ 2:5c601807d397

Version alpha3

Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft

Wiki formatting for drafts

Showing differences between two drafts of the same initiative

Display of outgoing delegation chains

Many other improvements
author bsw
date Mon Nov 23 12:00:00 2009 +0100 (2009-11-23)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/env/encode/highlight.lua	Mon Nov 23 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,10 @@
     1.4 +function encode.highlight(text)
     1.5 +  local text = encode.html(text)
     1.6 +  text = text:gsub("\027", "")
     1.7 +  text = text:gsub("\\\\", "\027b")
     1.8 +  text = text:gsub("\\%*", "\027a")
     1.9 +  text = text:gsub("%*([^%*]*)%*", '<span class="highlighted">%1</span>')
    1.10 +  text = text:gsub("\027a", "*")
    1.11 +  text = text:gsub("\027b", "\\")
    1.12 +  return text
    1.13 +end
    1.14 \ No newline at end of file

Impressum / About Us