Skip to content

Commit

Permalink
Get rid of relative link since it did not work well.
Browse files Browse the repository at this point in the history
  • Loading branch information
zspencer committed Jul 20, 2023
1 parent 86b55ea commit 1a05b2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/furniture/journal/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def autolink(link, link_type)
def postprocess(doc)
doc
.gsub(/@([a-zA-Z\d]*)@(.*\.[a-zA-Z]*)/, '<a href="https://\2/@\1">@\1@\2</a>')
.gsub(/#(\w+)/, '<a href="../terms/\1">#\1</a>')
.gsub(/#(\w+)/, '{keyword_\1}')
end
end
end
2 changes: 1 addition & 1 deletion spec/furniture/journal/entry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
let(:entry) { build(:journal_entry, body: "https://www.google.com @[email protected] #GoodTimes") }

it { is_expected.to include('<a href="https://www.google.com">https://www.google.com</a>') }
it { is_expected.to include('<a href="../terms/GoodTimes">#GoodTimes</a>') }
it { is_expected.to include("{keyword_GoodTimes}") }
end
end

Expand Down

0 comments on commit 1a05b2c

Please sign in to comment.