add performance test for dtext, fixes #2051

This commit is contained in:
r888888888
2013-12-03 15:50:58 -08:00
parent 1613116266
commit 327b52c2d3
8 changed files with 79 additions and 19 deletions

View File

@@ -122,3 +122,8 @@ table tfoot {
color: #666;
font-style: italic;
}
.tn {
font-size: 0.8em;
color: gray;
}

View File

@@ -18,11 +18,6 @@ div#note-container {
line-height: normal;
}
p.tn {
font-size: 0.8em;
color: gray;
}
> :last-child {
margin-bottom: 0;
}

View File

@@ -19,6 +19,7 @@ class DText
str.gsub!(/\[i\](.+?)\[\/i\]/i, '<em>\1</em>')
str.gsub!(/\[s\](.+?)\[\/s\]/i, '<s>\1</s>')
str.gsub!(/\[u\](.+?)\[\/u\]/i, '<u>\1</u>')
str.gsub!(/\[tn\](.+?)\[\/tn\]/i, '<p class="tn">\1</p>')
str = parse_links(str)
str = parse_aliased_wiki_links(str)