ethereum / eipw

Mozilla Public License 2.0
28 stars 27 forks source link

Panic in `markdown-json-cite` with non-ASCII input #100

Open SamWilsn opened 4 months ago

SamWilsn commented 4 months ago

The following (also attached) causes a panic:

---
eip: 3
---

Some text somewhere that needs a citation. [^1]

[^1]:
    ```csl-json
    {
      "author": [
        {
          "family": "Mazières"
        }
      ]
    }

The panic:

$ eipw --config ../config/eipw.toml eip-3074.md thread 'main' panicked at /home/sam/.cargo/registry/src/index.crates.io-6f17d22bba15001f/annotate-snippets-0.9.2/src/display_list/from_snippet.rs:275:9: SourceAnnotation range (0, 99) is bigger than source length 98 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

0xshikhar commented 2 days ago

Hey @SamWilsn , would like to work on this task - can you assign me that. Could you clarify the remaining tasks for this issue? Any additional context would be appreciated. Thanks!

SamWilsn commented 2 days ago

This is pretty much it. Take the attached input, and fix the panic. Any fixes would be very appreciated!

0xshikhar commented 2 days ago

got it. will like to work on it.