Comments (6)
我发现这是 yargs 参数解析的一个问题,这个命令特殊在 '-'
上,它会被认为是一个新参数而不是一个值。你可以改成这样:
find "$(pwd)" -type f -name "*.md" | npx md-padding@latest --ignore-words='-' ':' -f --read-files -i
注意 '-'
前面空格变成了等号。
from md-padding.
你好,我在指定下列参数运行后,大于号可以正确处理,小于号 <
则不行。
find "$(pwd)" -type f -name "*.md" | npx md-padding --ignore-words='-' ':' '>' '<' -f --read-files -i
另外似乎运行时不需要加 @latest
,反而会报告警告找不到版本。
另外能否增加一个功能:即指定跳过对文档某标题以后的(或者跳过标题 xx 到标题 xx 之间的内容不处理)内容。例如跳过标题 ## Bibliography
这一行标题后边的所有内容。
非常感谢。
from md-padding.
试试这个: https://github.com/harttle/md-padding?tab=readme-ov-file#%E5%BF%BD%E7%95%A5%E7%89%87%E6%AE%B5
from md-padding.
你好,又发现对等于号不生效。
Run find "$(pwd)" -type f -name "*.md" | npx md-padding --ignore-words='-' `=` ':' '>' '<' -f --read-files -i
/home/runner/work/_temp/c7d98935-f621-[4](https://github.com/taophilosophy/SEP-CN/actions/runs/9039422434/job/24842230924#step:5:5)bac-b21a-a16b36ddb1b2.sh: line 1: =: command not found
/opt/hostedtoolcache/node/20.12.2/x64/lib/node_modules/md-padding/dist/parser/parse.js:239
throw new Error(`unmatched ${RAW_BEGIN} at ${i}`);
^
Error: unmatched <!--md-padding-ignore-begin--> at 9362
at parse (/opt/hostedtoolcache/node/20.12.2/x64/lib/node_modules/md-padding/dist/parser/parse.js:239:23)
at padMarkdown (/opt/hostedtoolcache/node/20.12.2/x64/lib/node_modules/md-padding/dist/transformers/pad-markdown.js:9:3[5](https://github.com/taophilosophy/SEP-CN/actions/runs/9039422434/job/24842230924#step:5:6))
at Object.<anonymous> (/opt/hostedtoolcache/node/20.12.2/x64/lib/node_modules/md-padding/dist/bin/md-padding.js:37:44)
at Module._compile (node:internal/modules/cjs/loader:13[6](https://github.com/taophilosophy/SEP-CN/actions/runs/9039422434/job/24842230924#step:5:7)9:14)
at Module._extensions..js (node:internal/modules/cjs/loader:142[7](https://github.com/taophilosophy/SEP-CN/actions/runs/9039422434/job/24842230924#step:5:8):10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:2[8](https://github.com/taophilosophy/SEP-CN/actions/runs/9039422434/job/24842230924#step:5:9):4[9](https://github.com/taophilosophy/SEP-CN/actions/runs/9039422434/job/24842230924#step:5:10)
去掉等于号参数后,仍然报错:
Run find "$(pwd)" -type f -name "*.md" | npx md-padding --ignore-words='-' ':' '>' '<' -f --read-files -i
/opt/hostedtoolcache/node/20.12.2/x6[4](https://github.com/taophilosophy/SEP-CN/actions/runs/9039451903/job/24842307346#step:5:4)/lib/node_modules/md-padding/dist/parser/parse.js:239
throw new Error(`unmatched ${RAW_BEGIN} at ${i}`);
^
Error: unmatched <!--md-padding-ignore-begin--> at 9362
at parse (/opt/hostedtoolcache/node/20.12.2/x6[4](https://github.com/taophilosophy/SEP-CN/actions/runs/9039451903/job/24842307346#step:5:5)/lib/node_modules/md-padding/dist/parser/parse.js:239:23)
at padMarkdown (/opt/hostedtoolcache/node/20.12.2/x64/lib/node_modules/md-padding/dist/transformers/pad-markdown.js:9:3[5](https://github.com/taophilosophy/SEP-CN/actions/runs/9039451903/job/24842307346#step:5:6))
at Object.<anonymous> (/opt/hostedtoolcache/node/20.12.2/x[6](https://github.com/taophilosophy/SEP-CN/actions/runs/9039451903/job/24842307346#step:5:7)4/lib/node_modules/md-padding/dist/bin/md-padding.js:3[7](https://github.com/taophilosophy/SEP-CN/actions/runs/9039451903/job/24842307346#step:5:8):44)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:2[8](https://github.com/taophilosophy/SEP-CN/actions/runs/9039451903/job/24842307346#step:5:9):49
Node.js v20.12.2
去掉所有忽略参数:
Run find "$(pwd)" -type f -name "*.md" | npx md-padding --read-files -i
/opt/hostedtoolcache/node/20.12.2/x6[4](https://github.com/taophilosophy/SEP-CN/actions/runs/9039493875/job/24842421042#step:5:4)/lib/node_modules/md-padding/dist/parser/parse.js:239
throw new Error(`unmatched ${RAW_BEGIN} at ${i}`);
^
Error: unmatched <!--md-padding-ignore-begin--> at 9362
at parse (/opt/hostedtoolcache/node/20.12.2/x6[4](https://github.com/taophilosophy/SEP-CN/actions/runs/9039493875/job/24842421042#step:5:5)/lib/node_modules/md-padding/dist/parser/parse.js:239:23)
at padMarkdown (/opt/hostedtoolcache/node/20.12.2/x64/lib/node_modules/md-padding/dist/transformers/pad-markdown.js:9:3[5](https://github.com/taophilosophy/SEP-CN/actions/runs/9039493875/job/24842421042#step:5:6))
at Object.<anonymous> (/opt/hostedtoolcache/node/20.12.2/x[6](https://github.com/taophilosophy/SEP-CN/actions/runs/9039493875/job/24842421042#step:5:7)4/lib/node_modules/md-padding/dist/bin/md-padding.js:3[7](https://github.com/taophilosophy/SEP-CN/actions/runs/9039493875/job/24842421042#step:5:8):44)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:2[8](https://github.com/taophilosophy/SEP-CN/actions/runs/9039493875/job/24842421042#step:5:9):49
Node.js v20.12.2
Error: Process completed with exit code 1.
from md-padding.
又发现对等于号不生效。
等号你写成命令调用了,要用引号 '='
。
unmatched <!--md-padding-ignore-begin-->
这是因为没找到对应的 <!--md-padding-ignore-end-->
,如果写了还有问题,请发一个完整的文件来
from md-padding.
好的,可以运行了。
from md-padding.
Related Issues (20)
- vscode MPE 图片导入语句格式化后失败问题 HOT 2
- The automated release is failing 🚨
- 想问一下这个这个插件怎么和 vue-press 做集成 HOT 2
- 关于格式的几个疑问 HOT 1
- 需要解析代码中的字符串 HOT 4
- Feat: 允许添加例外:“UTC±0”不应该被插入空格 HOT 3
- YAML块中的时间会被格式化 HOT 2
- 建议加入关于行内公式的识别 HOT 2
- 是否考虑支持 .mdx 文件
- should recognize UnorderedListItem with * prefix in blockquote HOT 1
- 【feather request】 support callout syntax
- 有什么方法能支持识别 `<br />` 等特殊 htmlTag? HOT 1
- should recognize blockCode nested in UnorderedList correctly
- 在正文出现 URL 的时候,插件会错误地将 QueryString 的键值对格式化 HOT 2
- should be compatible with incorrect code syntax
- 非英文的拉丁字母识别错误,也会加空格 HOT 1
- 能否给与参数不处理英文之间的符号问题,或者不对特定英文标点进行处理 HOT 6
- 能否增加当前路径下递归查找指定格式文件的功能? HOT 1
- 以 `*` 开头的列表会对后边的 `*` 误识别 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md-padding.