Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/services/markup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def call
end

class WikiLinkFilter < HTMLPipeline::TextFilter
WIKI_LINK_REGEXP = /\[\[(?<link>[\d\w\sÅÄÖåäö:-]{1,35})\]\]/i.freeze
WIKI_LINK_REGEXP = /\[\[(?<link>[\d\w\sÅÄÖåäö.:-]{1,35})\]\]/i.freeze

def call
content = text
Expand Down
7 changes: 7 additions & 0 deletions test/unit/markup_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ def test_wiki_link_filter_with_multiple_links_on_two_rows
assert_equal html_output, Markup.to_html(content)
end

def test_wiki_link_filter_with_dot_in_link
content = %([[1.2.3]])
html_output = %(<p><a href="/1.2.3">1.2.3</a></p>\n)

assert_equal html_output, Markup.to_html(content)
end

def test_wikified_with_markdown
content = %([[Server]])
html_output = %(<p><a href="/Server">Server</a></p>\n)
Expand Down
Loading