diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2017-04-23 11:54:36 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2017-04-23 11:54:36 +0200 |
commit | 04658c491b94ed851c201f0d298e8dd398f81363 (patch) | |
tree | 95c1e374c6748ca41b37d3f11d4e02418a516019 /test | |
parent | 51a46b7e31c92c717ca4778df96535b0e492babe (diff) | |
download | pandoc-04658c491b94ed851c201f0d298e8dd398f81363.tar.gz |
Org reader: handle line numbering switch for src blocks
The line-numbering switch that can be given to source blocks (`-n` with
an start number as an optional parameter) is parsed and translated to a
class/key-value combination used by highlighting and other readers and
writers.
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Readers/Org.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs index 48f4989ce..4801bea3a 100644 --- a/test/Tests/Readers/Org.hs +++ b/test/Tests/Readers/Org.hs @@ -1556,6 +1556,15 @@ tests = params = [ ("rundoc-language", "sh"), ("rundoc-noeval", "yes") ] in codeBlockWith ("", classes, params) "echo $HOME\n" + , "Source block with line number switch" =: + unlines [ "#+BEGIN_SRC sh -n 10" + , ":() { :|:& };:" + , "#+END_SRC" + ] =?> + let classes = [ "bash", "numberLines" ] + params = [ ("startFrom", "10") ] + in codeBlockWith ("", classes, params) ":() { :|:& };:\n" + , "Example block" =: unlines [ "#+begin_example" , "A chosen representation of" |