azu / azu/gitbook-plugin-include-codeblock

Allow different types of escapes in template output

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

説明

To allow exact code to be generated in different scenarios, we should provide different kinds of escapes for templates to choose. Here is a tentative list of escapes we need:

- HTML escape ( now available as ``{{tag}}`` )
- No escape ( now available as ``{{{tag}}}`` )
- Backslash escape (there are two variants: JS and commonmark).
JS string escape appears to be used in quotes inside Nunjucks tags (verification still to be done).
The most noted difference of the escapes are about whether to escape "\n".
AsciiDoctor appears to have backslash escape that "aren't very reliable" (words quoted from section 12.5 of Asciidoctor user manual). I guess commonmark escapes do well there.

- URI escape (for use in ``)

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

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

調査の方向性

まず、現在のHTML形式とエスケープなし形式を提供している既存のテンプレート出力処理を見つけます。Nunjucksタグ内でJavaScript文字列のエスケープがどのように使用されているかを確認し、その後、JavaScript、CommonMark、URIに必要な動作を比較します。テンプレートが合意された各エスケープモードを選択でき、文書化されたケースで正確な出力が生成されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
documentation
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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