Skip to content

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

@mm3509

Description

@mm3509

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions