azu / azu/gitbook-plugin-include-codeblock
Allow different types of escapes in template output
- 主要語言
- 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 與不轉義形式。確認 JavaScript 字串轉義在 Nunjucks 標籤中的使用方式,然後比較 JavaScript、CommonMark 與 URI 所需的行為。當範本可以選擇每種已達成共識的轉義模式,且文件記錄的案例產生完全準確的輸出時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- documentation
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100