Add support for litteral tags, simpler regexp.

This commit is contained in:
Mayhem 2013-08-14 16:13:32 +02:00
parent c2cc0b4599
commit 5924dbb4bb

View File

@ -156,11 +156,7 @@ Get =
# https://github.com/eksopl/asagi/blob/master/src/main/java/net/easymodo/asagi/Yotsuba.java#L109-138
bq.innerHTML = bq.innerHTML.replace ///
\n
| \[/?b\]
| \[/?spoiler\]
| \[/?code\]
| \[/?moot\]
| \[/?banned\]
| \[/?[a-z]+(:lit)?\]
///g, (text) ->
switch text
when '\n'
@ -185,6 +181,8 @@ Get =
'<strong style="color: red;">'
when '[/banned]'
'</strong>'
else
text.replace ':lit', ''
comment = bq.innerHTML
# greentext