-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In Markdown table cells, apply HTML escaping only to code blocks, and…
… apply it properly (#167) In Markdown table cells, apply HTML escaping only to code blocks, and apply it properly Since #161 removed HTML escaping for defaults and function docstrings, we should do the same for attribute and param docs in table cells. The only limitations Markdown places on table cells are: * no pipe characters (they must be escaped with a backslash) * no newlines (they must be transformed into `<br>` or an HTML entity) The latter restriction makes it impossible to have a fenced code block inside a table cell. Therefore: * we do not escape HTML or Markdown markup outside a fenced code block * we keep existing logic for escaping newlines outside a fenced code block * we fix fence detection (e.g. allowing more than 3 fence characters to support embedded code blocks in code blocks, allowing tildes as fence characters, properly handling language names, etc.); * in code block content, we escape HTML, and we escape newlines as HTML entities (since `<br>` does not work in a `<pre><code>` block) - finally fixing code block newlines in table cells. This is a followup to #161. Partially addresses #118
- Loading branch information
Showing
12 changed files
with
193 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.