about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/lib/extractor.rb4
-rw-r--r--spec/lib/formatter_spec.rb8
2 files changed, 12 insertions, 0 deletions
diff --git a/app/lib/extractor.rb b/app/lib/extractor.rb
index c582b5e4d..957364293 100644
--- a/app/lib/extractor.rb
+++ b/app/lib/extractor.rb
@@ -56,4 +56,8 @@ module Extractor
     tags.each { |tag| yield tag[:hashtag], tag[:indices].first, tag[:indices].last } if block_given?
     tags
   end
+
+  def extract_cashtags_with_indices(_text)
+    [] # always returns empty array
+  end
 end
diff --git a/spec/lib/formatter_spec.rb b/spec/lib/formatter_spec.rb
index 1db7f0bc9..2e0f11110 100644
--- a/spec/lib/formatter_spec.rb
+++ b/spec/lib/formatter_spec.rb
@@ -46,6 +46,14 @@ RSpec.describe Formatter do
       end
     end
 
+    context 'with cashtag' do
+      let(:local_text) { 'Hello world $AAPL' }
+
+      it 'skip cashtag' do
+        expect(subject).to match '<p>Hello world $AAPL</p>'
+      end
+    end
+
     context 'with reblog' do
       let(:local_status) { Fabricate(:status, account: account, reblog: Fabricate(:status, text: 'Hello world', account: account)) }