azu / azu/gitbook-plugin-include-codeblock

Only match includes at the beginning of the line

オープン
#67 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
40
フォーク
25
PR マージ指標
30日以内にマージされた PR はありません

説明

It seems that this is matching all links whether they start at the beginning of the line or not. Here's the regex in use:

```regexp
/\[(?=((?:[^\]]|\\.)*))\1\]\((?=((?:[^\)]|\\.)*))\2\)/gm
```

Seems like a simple fix would be:

```regexp
/^\[(?=((?:[^\]]|\\.)*))\1\]\((?=((?:[^\)]|\\.)*))\2\)/gm
```

This is related to #65. Another fix that would resolve both issues, and increase the performance of the plugin:

```regexp
/^\[(?=(import|include(?:[^\]]|\\.)*))\1\]\((?=((?:[^\)]|\\.)*))\2\)/gm
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。