From 1a05b2c4b5ae2c44b49f8dceddbbe867c31409c4 Mon Sep 17 00:00:00 2001
From: Zee Spencer <50284+zspencer@users.noreply.github.com>
Date: Thu, 13 Jul 2023 16:01:35 -0700
Subject: [PATCH] Get rid of relative link since it did not work well.
---
app/furniture/journal/renderer.rb | 2 +-
spec/furniture/journal/entry_spec.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/furniture/journal/renderer.rb b/app/furniture/journal/renderer.rb
index 85b3d9400..248ae12fc 100644
--- a/app/furniture/journal/renderer.rb
+++ b/app/furniture/journal/renderer.rb
@@ -8,7 +8,7 @@ def autolink(link, link_type)
def postprocess(doc)
doc
.gsub(/@([a-zA-Z\d]*)@(.*\.[a-zA-Z]*)/, '@\1@\2')
- .gsub(/#(\w+)/, '#\1')
+ .gsub(/#(\w+)/, '{keyword_\1}')
end
end
end
diff --git a/spec/furniture/journal/entry_spec.rb b/spec/furniture/journal/entry_spec.rb
index c2ac01a50..da84ea865 100644
--- a/spec/furniture/journal/entry_spec.rb
+++ b/spec/furniture/journal/entry_spec.rb
@@ -17,7 +17,7 @@
let(:entry) { build(:journal_entry, body: "https://www.google.com @zee@weirder.earth #GoodTimes") }
it { is_expected.to include('https://www.google.com') }
- it { is_expected.to include('#GoodTimes') }
+ it { is_expected.to include("{keyword_GoodTimes}") }
end
end