diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-02-09 23:10:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-09 23:10:00 -0700 |
| commit | 420babf0029df88cfebdc4ea26200026c65098c9 (patch) | |
| tree | 9a1c0149a1b7eef20acea3ae65059467420f9db7 /test/sections_test.rb | |
| parent | ca6f0d918cfa9b0019afdedf22efb04f95fc580b (diff) | |
resolves #3060 require setext section title to have at least one alphanumeric character (PR #3061)
- although documented this way, the parser was checking for at least one word character, which is different
Diffstat (limited to 'test/sections_test.rb')
| -rw-r--r-- | test/sections_test.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/sections_test.rb b/test/sections_test.rb index a2c04c4f..ddfabebe 100644 --- a/test/sections_test.rb +++ b/test/sections_test.rb @@ -528,6 +528,30 @@ context 'Sections' do assert_includes result, '----^^----' end + test 'should not recognize section title that does not contain alphanumeric character' do + input = <<~'EOS' + !@#$ + ---- + EOS + + using_memory_logger do |logger| + result = convert_string_to_embedded input + assert_css 'h2', result, 0 + end + end + + test 'should not recognize section title that consists of only underscores' do + input = <<~'EOS' + ____ + ---- + EOS + + using_memory_logger do |logger| + result = convert_string_to_embedded input + assert_css 'h2', result, 0 + end + end + test 'should preprocess second line of setext section title' do input = <<~'EOS' Section Title |
