Make all Markdown extensions configurable Allow site admins to selectively enable or disable Markdown extensions. This can help a site avoid creating documentation that isn't compatible with other CommonMark parsers. Change-Id: I0466b03ef213a398d79f943af2ddf95a7e0853e7
diff --git a/Documentation/config.md b/Documentation/config.md index 65feff2..27db57a 100644 --- a/Documentation/config.md +++ b/Documentation/config.md
@@ -52,8 +52,51 @@ imageLimit = 256K ``` +### Extensions + +The following extensions can be enabled/disabled in the markdown +section: + +* `githubFlavor`: enable extensions that mirror GitHub Flavor + Markdown behavior. Default is true. + +* `autolink`: automatically convert plain URLs and email + addresses into links. Default follows `gihubFlavor`. + +* `blocknote`: Gitiles style note/promo/aside blocks to raise + awareness to important content. Default false. + +* `ghthematicbreak`: accept `--` for `<hr>`, like GitHub Flavor + Markdown. Default follows `githubFlavor`. + +* `multicolumn`: Gitiles extension to layout content in a 12 cell + grid, delinated by section headers. Default false. + +* `namedanchor`: Gitiles extension to extract named anchors using + `#{id}` syntax. Default false. + +* `safehtml`: Gitiles extension to accept very limited HTML; for + security reasons all other HTML is dropped regardless of this + setting. Default follows `githubFlavor`. + +* `smartquote`: Gitiles extension to convert single and double quote + ASCII characters to Unicode smart quotes when in prose. Default + false. + +* `strikethrough`: strikethrough text with GitHub Flavor Markdown + style `~~`. Default follows `githubFlavor`. + +* `tables`: format tables with GitHub Flavor Markdown. Default + follows `githubFlavor`. + +* `toc`: Gitiles extension to replace `[TOC]` in a paragraph by itself + with a server-side generated table of contents extracted from section + headers. Default true. + ### IFrames +IFrame support requires `markdown.safehtml` to be true. + IFrame source URLs can be whitelisted by providing a list of allowed URLs. URLs ending with a `/` are treated as prefixes, allowing any source URL beginning with that prefix.