Disable formatting of monospaced text in Asciidoctor templates

Previously, if text enclosed in ` characters contained multiple *
characters, the *s would be removed and the characters they enclosed
would become bold.

This commit escapes the text by enclosing it in + characters in
addition to the existing, enclosing ` characters. The `+text+`
arrangement retains the monospace formatting be disables any further
formatting of the text.

Closes gh-474
This commit is contained in:
Andy Wilkinson
2018-03-27 15:34:14 +01:00
parent 0b0c9e1cc4
commit 7924d5fb01
10 changed files with 21 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
|Relation|Description
{{#links}}
|{{#tableCellContent}}`{{rel}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{rel}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/links}}

View File

@@ -3,7 +3,7 @@
|Parameter|Description
{{#parameters}}
|{{#tableCellContent}}`{{name}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/parameters}}

View File

@@ -2,8 +2,8 @@
|Path|Type|Description
{{#fields}}
|{{#tableCellContent}}`{{path}}`{{/tableCellContent}}
|{{#tableCellContent}}`{{type}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{path}}+`{{/tableCellContent}}
|{{#tableCellContent}}`+{{type}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/fields}}

View File

@@ -2,7 +2,7 @@
|Name|Description
{{#headers}}
|{{#tableCellContent}}`{{name}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/headers}}

View File

@@ -2,7 +2,7 @@
|Parameter|Description
{{#parameters}}
|{{#tableCellContent}}`{{name}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/parameters}}

View File

@@ -2,8 +2,8 @@
|Path|Type|Description
{{#fields}}
|{{#tableCellContent}}`{{path}}`{{/tableCellContent}}
|{{#tableCellContent}}`{{type}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{path}}+`{{/tableCellContent}}
|{{#tableCellContent}}`+{{type}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/fields}}

View File

@@ -2,7 +2,7 @@
|Part|Description
{{#requestParts}}
|{{#tableCellContent}}`{{name}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/requestParts}}

View File

@@ -2,8 +2,8 @@
|Path|Type|Description
{{#fields}}
|{{#tableCellContent}}`{{path}}`{{/tableCellContent}}
|{{#tableCellContent}}`{{type}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{path}}+`{{/tableCellContent}}
|{{#tableCellContent}}`+{{type}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/fields}}

View File

@@ -2,7 +2,7 @@
|Name|Description
{{#headers}}
|{{#tableCellContent}}`{{name}}`{{/tableCellContent}}
|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/headers}}