satouriko / copywriting-correct Goto Github PK
View Code? Open in Web Editor NEW中英文文案排版纠正器。
Home Page: https://copywriting-correct.js.org/
License: MIT License
中英文文案排版纠正器。
Home Page: https://copywriting-correct.js.org/
License: MIT License
我在使用 remark-lint with remark-copywriting-correct 时,报错如下:
<stdin>
1:1 error Error: Cannot parse file `.remarkrc`
Cannot parse script `C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\index.js`
ReferenceError: window is not defined
at Object.<anonymous> (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:574:4)
at __webpack_require__ (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:39:30)
at Object.<anonymous> (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:469:13)
at __webpack_require__ (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:39:30)
at Object.<anonymous> (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:523:24)
at __webpack_require__ (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:39:30)
at Object.<anonymous> (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:1535:35)
at __webpack_require__ (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:39:30)
at C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:103:18
at C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-copywriting-correct\node_modules\copywriting-correct\dist\copywriting-correct.common.js:106:10
at Error (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-cli\node_modules\fault\index.js:29:12)
at done (C:\Users\yyfouuan\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\find-up.js:156:11)
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)
× 1 error
环境:
解决方案:
将 a6d64ed#diff-e947c22935dcd695a75b4721c182e795R574 中的 window
改为 this
,未报错,未发现异常。
数字后面跟着英文字符则在数字后添加空格(适用于数字+单位,例如 1 GB)
这条规则是从 ricoa/copywriting-correct 那里搬过来的。
有关相应原则的解释说明:mzlogin/chinese-copywriting-guidelines#11
但是这条规则并不好,会存在误判的情况,比如 21st Century
类似于这个 Action: https://github.com/MarvinJWendt/run-node-formatter
感谢!
间隔号 ·
(\u00b7
)是一个中文非常常用的半角符号:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.