# frozen_string_literal: true describe PrettyText do before { Jobs.run_immediately! } it "can be disabled" do SiteSetting.enable_markdown_footnotes = false markdown = <<~MD Here is a footnote, [^1] [^1]: I am one MD html = <<~HTML
Here is a footnote, [^1]
\n[^1]: I am one
HTML cooked = PrettyText.cook markdown.strip expect(cooked).to eq(html.strip) end it "supports normal footnotes" do markdown = <<~MD Here is a footnote, [^1] and another. [^test] [^1]: I am one [^test]: I am one test multiline MD html = <<~HTMLHere is a footnote, [1] and another. [2]
test multiline
Here is a footnote, [1] and another. [2]
test multiline
I have a point, see footnote. [1]