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 ``)
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by locating the existing template-output handling that provides the current HTML and no-escape forms. Verify how JavaScript string escaping is used inside Nunjucks tags, then compare the required JavaScript, CommonMark, and URI behaviors. Done means templates can choose each agreed escape mode and the documented cases produce exact output.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- documentation
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100