azu / azu/gitbook-plugin-include-codeblock

Allow different types of escapes in template output

Đang mở
#53 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
40
Fork
25
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 ``)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
documentation
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.