FEATURE: Replace markdown-it replacements rule. (#12417)

We override the default replacements rule to no longer replace "(c)", "(p)", and "(p)". Additionally, we merged the custom arrows rule into the replacement function.
This commit is contained in:
Roman Rizzi
2021-03-18 10:55:41 -03:00
committed by GitHub
parent 1a433193d1
commit da210b6d77
4 changed files with 167 additions and 34 deletions

View File

@@ -1442,10 +1442,10 @@ HTML
it 'supports typographer' do
SiteSetting.enable_markdown_typographer = true
expect(PrettyText.cook('(tm)')).to eq('<p></p>')
expect(PrettyText.cook('->')).to eq('<p></p>')
SiteSetting.enable_markdown_typographer = false
expect(PrettyText.cook('(tm)')).to eq('<p>(tm)</p>')
expect(PrettyText.cook('->')).to eq('<p>-&gt;</p>')
end
it 'uses quotation marks from site settings' do