martinring / markdown-it-citations

pandoc style citations for markdown-it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bascic example

sajozsattila opened this issue · comments

Hello,

I would like to try out your package, however, I could not manage to work. I have put my code in the https://github.com/sajozsattila/markdown-it-citations_example. Is this possible you could give me a hand on this?

The Error msg which I get after npm run build:

> markdown-it-citations_example@1.0.0 build /Mur2/Git/Tmp/mur2_bibtex_2
> tsc

node_modules/@citeproc-rs/wasm/_esm/citeproc_rs_wasm.d.ts:200:15 - error TS1359: Identifier expected. 'default' is a reserved word that cannot be used here.

200     unwrap_or(default: T): T;
                  ~~~~~~~

node_modules/@citeproc-rs/wasm/_esm/citeproc_rs_wasm.d.ts:204:15 - error TS1359: Identifier expected. 'default' is a reserved word that cannot be used here.

204     map_or<R>(default: R, f: (t: T) => R): R;
                  ~~~~~~~


Found 2 errors.

This is an issues with the citeproc-rs typescript definition files. If you use a build tool such as esbuild you can ignore this error and mark "@citeproc-rs/wasm" as an external dependency.

An alternative would be to use citeproc-js. However there are no typescript definition files at all.

I would reccomend to use javascript instead of typescript here to avoid these issues.

You might also want to report the error in the citeproc-rs repo