diff options
author | Ugnich Anton | 2013-01-05 03:59:25 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-01-05 03:59:25 +0700 |
commit | fc53fd7d63c703b2664e5cb0cbd6360e4b3f7bd5 (patch) | |
tree | 092443ac6bffcb9cd9de3ca9249f7a14cfee9c24 /src/java/com/juick/http/www/UserThread.java | |
parent | 6df23a2abefb11b694afc359358a450f704d41bf (diff) |
Tag *code
Diffstat (limited to 'src/java/com/juick/http/www/UserThread.java')
-rw-r--r-- | src/java/com/juick/http/www/UserThread.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 9001bd17..3b315be2 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -114,6 +114,13 @@ public class UserThread { break; } + String txt; + if (!msg.Tags.isEmpty() && msg.Tags.contains("code")) { + txt = PageTemplates.formatMessageCode(msg.Text); + } else { + txt = PageTemplates.formatMessage(msg.Text); + } + out.println("<ul>"); out.println(" <li id=\"msg-" + mid + "\" class=\"msg msgthread\">"); out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.User.UName + "/\"><img src=\"//i.juick.com/a/" + msg.User.UID + ".png\" alt=\"" + msg.User.UName + "\"/></a></div>"); @@ -122,7 +129,7 @@ public class UserThread { if (msg.Place != null) { out.println(" <div class=\"msg-place\"><a href=\"/places/" + msg.Place.pid + "\">" + msg.Place.name + "</a></div>"); } - out.println(" <div class=\"msg-txt\">" + PageTemplates.formatMessage(msg.Text) + "</div>"); + out.println(" <div class=\"msg-txt\">" + txt + "</div>"); if (msg.AttachmentType != null) { if (msg.AttachmentType.equals("jpg")) { |