Skip to content

Commit

Permalink
🧹 Journal: Rename the method that turns Keywords into Links
Browse files Browse the repository at this point in the history
  • Loading branch information
zspencer committed Jul 27, 2023
1 parent 1283a61 commit 6be22f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/furniture/journal/entry_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ def body_html

private def postprocess(text)
entry.keywords.map do |keyword|
replace_keyword(text, keyword)
linkify_keyword(text, keyword)
end

text
end

private def replace_keyword(text, keyword)
private def linkify_keyword(text, keyword)
text.gsub!(keywords_regex(keyword)) do |match|
link_to(match, keyword.location)
end
Expand Down

0 comments on commit 6be22f4

Please sign in to comment.