diff --git a/frontend/src/metabase/visualizations/visualizations/Text.css b/frontend/src/metabase/visualizations/visualizations/Text.css index 132bffb07f7c4d9e40d9ae3844393ffb9465b808..938a0a61bfb049265c86bfb500939a33764eadc8 100644 --- a/frontend/src/metabase/visualizations/visualizations/Text.css +++ b/frontend/src/metabase/visualizations/visualizations/Text.css @@ -155,6 +155,10 @@ height: auto; } +:local .text-card-markdown hr { + margin: 0; +} + :local .single-row { margin: 0; } diff --git a/src/metabase/pulse/markdown.clj b/src/metabase/pulse/markdown.clj index 4df6a160e7df3807a0703d1d854b7b4fe51b8aeb..b4dad9eb60b2b887a6d0b8c2a177da6153b8a893 100644 --- a/src/metabase/pulse/markdown.clj +++ b/src/metabase/pulse/markdown.clj @@ -228,7 +228,10 @@ :hard-line-break "\n" - (:heading) + :horizontal-line + "\n───────────────────\n" + + :heading (str "*" joined-content "*\n") :bold diff --git a/test/metabase/pulse/markdown_test.clj b/test/metabase/pulse/markdown_test.clj index 2a3920bc952496f29ca829e42f146e00bf14fef4..4463e39a65263cf21a37b8a178f89e538488c084 100644 --- a/test/metabase/pulse/markdown_test.clj +++ b/test/metabase/pulse/markdown_test.clj @@ -40,6 +40,10 @@ (is (= "foo\nbar" (mrkdwn "foo \nbar"))) (is (= "foo\nbar" (mrkdwn "foo\\\nbar")))) + (testing "Horizontal lines are created using box drawing characters" + (is (= "───────────────────" (mrkdwn "----"))) + (is (= "text\n\n───────────────────\ntext" (mrkdwn "text\n\n----\ntext")))) + (testing "Code blocks are preserved" (is (= "`code`" (mrkdwn "`code`"))) (is (= "```\ncode\nblock```" (mrkdwn " code\n block")))