Giter VIP home page Giter VIP logo

Comments (3)

huacnlee avatar huacnlee commented on June 13, 2024

PEG 模式,是需要实现所有场景,对每一种变数都覆盖到,有一个漏掉的都不行

from autocorrect.

huacnlee avatar huacnlee commented on June 13, 2024

所以你看 autocorrect 里面,我有个 OTHER 类型,用于覆盖那些我没支持的,然后转换的时候保持原始输出

from autocorrect.

huacnlee avatar huacnlee commented on June 13, 2024

https://github.com/huacnlee/autocorrect/blob/main/src/lib/grammar/markdown.pest 这个不能用于参考,autocorrect 的场景是为了修正 “字符串” 里面的格式,所以这个 markdown.pest 文件优先是找出了不想处理的部分,忽略掉了。

而其他的 pest 文件,例如 ruby.pest 和 Markdown 的处理相反,是找出 string, comment 等需要处理的,把其他未识别的当成 other 不做处理。

from autocorrect.

Related Issues (20)

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.