pandoc-emphasize-code icon indicating copy to clipboard operation
pandoc-emphasize-code copied to clipboard

pandoc-emphasize-code: user error (Invalid position: 2)

Open mm3509 opened this issue 6 years ago • 0 comments

Hello! Good job with the package. I'm a new contributor and I think that the filter gives an error with whole-line ranges when I tried it out of the box.

I set up the pandoc-emphasize-code binary with:

wget -O ~/Downloads/ 'https://github.com/owickstrom/pandoc-emphasize-code/releases/download/v0.2.3/pandoc-emphasize-code-osx-ghc8-pandoc-1-19.tar.gz'
tar -xvzf ~/Downloads/pandoc-emphasize-code-osx-ghc8-pandoc-1-19.tar.gz

I set up a file ~/Downloads/temp.md with the example in the Readme:

```{.haskell emphasize=2-2,3:3-3:12}
myFunc = do
  newStuffHere
  andThisToo notThis
  notSoRelevant
```

Then I run:

$ pandoc --filter ~/Downloads/pandoc-emphasize-code -o ~/Downloads/temp.html ~/Downloads/temp.md
pandoc-emphasize-code: user error (Invalid position: 2)
Error running filter ~/Downloads/pandoc-emphasize-code:
Filter returned error status 1

If I remove the first range and the markdown file looks like:

```{.haskell emphasize=3:3-3:12}
myFunc = do
  newStuffHere
  andThisToo notThis
  notSoRelevant
```

Then pandoc makes the output without problems.

mm3509 avatar Jan 16 '19 16:01 mm3509