Spurious {1} inserted into autodetect code highlighting when numbering enabled.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
まず、行番号を有効にした自動検出 SQL コードブロックを使って Markdown プラグインで問題を再現し、その後、コードハイライトと行番号付けの統合を調査します。SQL の自動検出によって空の後続行に不要な {1} テキストが挿入されなくなり、明示的な SQL ハイライトと他の言語に影響がないことを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
There is a bug where specific words in a code block set to use line numbering will cause some empty following lines to have spurious {1} text inserted in it. e.g.:

this can be confirmed by inspecting the <code class> element it will be set to hljs sql for blocks with this issue and hljs perl or other wise for blocks of code without this issue.
This only happens if the code language is autodetected as SQL (hence why the specific words are needed to trigger the highlight.js autodetection for SQL). if the language type is set to SQL or any other type it does not happen:

If line numbering for SQL is turned off in the markdown plugin settings it does not happen:

(note no line numbering, no {1})
So we can work around this issue by just not having line numbering for SQL as we don't post SQL frequently/at all on our forum.
Versions:
NodeBB version: 1.18.5 (although we have had this issue from at least 1.16)
Markdown plugin version: 8.14.4
- 主要言語
- JavaScript
- スター
- 33
- フォーク
- 41
- 平均マージ
- 3時間 40分
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NodeBB/nodebb-plugin-markdown のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
NodeBB/nodebb-plugin-markdown#229 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
NodeBB/nodebb-plugin-markdown#225 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
NodeBB/nodebb-plugin-markdown#216 ·
-
NodeBB/nodebb-plugin-markdown#213 · 担当者 1 名 ·
-
Dependency Dashboard オープン
難易度 1/5 1時間未満 初心者へのやさしさ 10/100
NodeBB/nodebb-plugin-markdown#147 ·
NodeBB/nodebb-plugin-markdown の issue をすべて見る
似ている issue
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/safe-publish#594 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100