Giter Club home page Giter Club logo

rehype-retext's People

Contributors

greenkeeperio-bot avatar riley-martine avatar wooorm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

riley-martine

rehype-retext's Issues

Readme example doesn't work

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

https://stackblitz.com/edit/github-mfdkiw?file=example.js

Steps to reproduce

  1. Go to minimal reproduction
  2. Run node example.js

Expected behavior

As per readme, I expected

example.html
5:3-5:4   warning Use `An` before `implicit`, not `A` retext-indefinite-article retext-indefinite-article
6:12-6:19 warning Expected `and` once, not twice      and                       retext-repeated-words

⚠ 2 warnings

and

<!doctypehtml><meta charset=utf8><title>Hello!</title><article>A implicit sentence.<h1>This and and that.</h1></article>

to be logged.

Actual behavior

The following error is logged.

Error: parser.tokenize is not a function
    at _evaluate (https://zzmimxpqlgithub-wfd2.w-corp-staticblitz.com/blitz.9e2d28a3.js:40:786645)

Node.js 18.20.3

Note: When using TypeScript, there's also the following type error:

Argument of type '[Processor<Root, Root, undefined, undefined, undefined>]' is not assignable to parameter of type '[boolean] | [parser: Parser]'.
  Type '[Processor<Root, Root, undefined, undefined, undefined>]' is not assignable to type '[boolean]'.
    Type 'Processor<Root, Root, undefined, undefined, undefined>' is not assignable to type 'boolean'.

I removed TS from the reproduction to keep it truly minimal, however.

Runtime

No response

Package manager

No response

OS

No response

Build and bundle tools

No response


Addendum: Curiously enough, on Safari the minimal repro doesn't consistently log the error for me (it still doesn't work, though). On Chrome and Firefox the error is logged consistently. This feels like it's probably unrelated to this project, however.

Upgrade @types/hast to 3

Initial checklist

Problem

When using these with other newer packages that use Hast 3, we get errors due to typing mismatches.

Solution

Upgrade @types/hast to 3. I tried to do this myself, but ran into issues with TypeScript complaining about this bindings somehow.

Alternatives

While I'm experienced with TS and such, I feel like I'm lacking some context to fix this issues. If I could be helped a bit, I'd be happy to submit PRs across the ecosystem to help us all get upgraded :)

Documentation Bad Link

readme.md

This ---------> rehype-remark — Transform HTML (hast) to Markdown (mdast)
has the wrong link in it. It links to rehype-retext and not rehype-remark

(edit by woorm to clean issue)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.