This commit is contained in:
r888888888
2014-06-20 17:36:11 -07:00
parent 836bd16c47
commit 2aa9288d52
2 changed files with 5 additions and 1 deletions

View File

@@ -103,7 +103,7 @@ class DText
def self.parse_id_links(str)
str = str.gsub(/\bpost #(\d+)/i, %{<a href="/posts/\\1">post #\\1</a>})
str = str.gsub(/\bforum #(\d+)/i, %{<a href="/forum_posts/\\1">forum #\\1</a>})
str = str.gsub(/\btopic #(\d+)/i, %{<a href="/forum_topics/\\1">topic #\\1</a>})
str = str.gsub(/\btopic #(\d+)(?:\/p(\d+))?/i, %{<a href="/forum_topics/\\1?page=\\2">topic #\\1</a>})
str = str.gsub(/\bcomment #(\d+)/i, %{<a href="/comments/\\1">comment #\\1</a>})
str = str.gsub(/\bpool #(\d+)/i, %{<a href="/pools/\\1">pool #\\1</a>})
str = str.gsub(/\buser #(\d+)/i, %{<a href="/users/\\1">user #\\1</a>})