diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-11-01 15:18:52 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2018-11-01 15:19:50 -0600 |
| commit | 79e0de8469d0a2cb173fd7f46ba8b1d85f5f9d7c (patch) | |
| tree | 2cc99cfbb68317690c57b15639fedcb081537ac1 /test | |
| parent | 9e5d9cab9f1ae8ce0399459a02f43b2c2610cac1 (diff) | |
add support for start attribute when highlighting with prettify
Diffstat (limited to 'test')
| -rw-r--r-- | test/blocks_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/blocks_test.rb b/test/blocks_test.rb index 1d4fc98d..e06d1aa8 100644 --- a/test/blocks_test.rb +++ b/test/blocks_test.rb @@ -3320,6 +3320,19 @@ puts "foo" assert_css 'pre > code.language-ruby[data-lang="ruby"]', output, 1 end + test 'should set linenums start if linenums are enabled and start attribute is set when source-highlighter is prettify' do + input = <<-EOS +[source%linenums,ruby,start=5] +---- +puts "foo" +---- + EOS + + output = convert_string_to_embedded input, :attributes => {'source-highlighter' => 'prettify'} + assert_css 'pre[class="prettyprint highlight linenums:5"]', output, 1 + assert_css 'pre > code.language-ruby[data-lang="ruby"]', output, 1 + end + test 'should set lang attribute on pre when source-highlighter is html-pipeline' do input = <<-EOS [source,ruby] |
