diff options
| author | Asko Nõmm <84135165+askonomm@users.noreply.github.com> | 2022-04-30 13:11:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-30 13:11:57 +0300 |
| commit | 4393901425177a36e091e5d29926383e7a546b75 (patch) | |
| tree | 08fe69fe0a4de92ac65a81612ee21dfb60834977 /test/clarktown/renderers/heading_block_test.clj | |
| parent | faf11bf88b598d55f81899784c7c16e32a8d415d (diff) | |
| parent | 2e548f1bc696db90d11024600d5ccce73131135f (diff) | |
Merge pull request #26 from askonomm/issue-24
Allow an ATX heading block to precede with up to 3 spaces
Diffstat (limited to 'test/clarktown/renderers/heading_block_test.clj')
| -rw-r--r-- | test/clarktown/renderers/heading_block_test.clj | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/clarktown/renderers/heading_block_test.clj b/test/clarktown/renderers/heading_block_test.clj index 7647b53..8f229fb 100644 --- a/test/clarktown/renderers/heading_block_test.clj +++ b/test/clarktown/renderers/heading_block_test.clj @@ -35,7 +35,20 @@ (testing "No H tag when there is no space between # characters and value" (is (= "#This is not a heading block." - (heading-block/render "#This is not a heading block." nil nil))))) + (heading-block/render "#This is not a heading block." nil nil)))) + + (testing "ATX heading can precede up to 3 spaces" + (is (= "<h1>This is a heading.</h1>" + (heading-block/render " # This is a heading." nil nil))) + (is (= "<h1>This is a heading.</h1>" + (heading-block/render " # This is a heading." nil nil))) + (is (= "<h1>This is a heading.</h1>" + (heading-block/render " # This is a heading." nil nil)))) + + (testing "But no more than 3 spaces" + (is (= " # This is a heading." + (heading-block/render " # This is a heading." nil nil))))) + (deftest settext-heading-renderer-text |
