diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-09-11 18:12:19 -0500 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-09-11 18:39:39 -0500 |
commit | 67cf5917e04f4afeaeb9e19a6154f0318f81e577 (patch) | |
tree | 2df6846254a4463b713f71054aa8cd5a641f2c9a /spec/lib/banzai | |
parent | e91dc8f4badfdb4742d1662f34edd85f43fb317f (diff) | |
download | gitlab-ce-67cf5917e04f4afeaeb9e19a6154f0318f81e577.tar.gz |
'code_block' closer to original implementation
- utilize the 'out' method to output the 'fence_info',
which converts to utf8
- output 'sourcepos' again
Diffstat (limited to 'spec/lib/banzai')
-rw-r--r-- | spec/lib/banzai/filter/markdown_filter_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/markdown_filter_spec.rb b/spec/lib/banzai/filter/markdown_filter_spec.rb index a515d07b072..5cf9e698375 100644 --- a/spec/lib/banzai/filter/markdown_filter_spec.rb +++ b/spec/lib/banzai/filter/markdown_filter_spec.rb @@ -40,6 +40,12 @@ describe Banzai::Filter::MarkdownFilter do expect(result).to start_with("<pre><code>") end + + it 'works with utf8 chars in language' do + result = filter("```日\nsome code\n```") + + expect(result).to start_with("<pre><code lang=\"日\">") + end end context 'using Redcarpet' do |