mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FIX: Improve anchor links (#12683)
* FIX: Use theme color for anchor icon * FIX: Do not count anchor links * FIX: Do not count hashtags links either * DEV: Add tests for link_count * FIX: Disable anchors in quotes and preview * FIX: Try building some anchor slugs for unicode * DEV: Fix tests
This commit is contained in:
@@ -110,7 +110,7 @@ module PrettyText
|
||||
[category.url, text]
|
||||
elsif (!is_tag && tag = Tag.find_by(name: text)) ||
|
||||
(is_tag && tag = Tag.find_by(name: text.gsub!(TAG_HASHTAG_POSTFIX, '')))
|
||||
["#{Discourse.base_url}/tag/#{tag.name}", text]
|
||||
[tag.url, text]
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user