I'm trying to get running a GitHub action link checker that checks markdown files for URLs. I have a Jekyll site.
The link checker looks for files, rather than full URLs, as a result:
This fails - /docs/article1/
But this works - /docs/article1.md
I have the following rewrite in place that works for most use cases:
{ "pattern": "(\\S+)\/(\\s|$)", "replacement": "$1$2" }
However, it does not work if the trailing slash is missing from the the link.
Can someone recommend a regex update that will capture either:
/docs/article1/
/docs/article1
And rewrite it as /docs/article1.md
?
没有评论:
发表评论