2021-11-10 14:34:00 +00:00
|
|
|
#**
|
|
|
|
This rule template is used for rendering HTML in attribute table cells
|
|
|
|
*#
|
|
|
|
#*
|
|
|
|
Workaround for markdownCellFormat() not allowing HTML (specifically lists) to be rendered in attribute table cells.
|
|
|
|
|
|
|
|
TODO: Once https://github.com/bazelbuild/bazel/pull/14230 is merged, remove this macro and replace with call to
|
|
|
|
util.markdownCellFormatWithHtml($attribute.docString, true)
|
|
|
|
*#
|
|
|
|
#macro( markdownCellFormatNoEscapeHtml $docString )#*
|
|
|
|
*##if ($docString.contains("<ul>") || $docString.contains("<ol>"))#*
|
|
|
|
*#${docString.trim().replaceAll("\n(\\s*\n)+", "<br><br>").replaceAll("\n", " ")}#*
|
|
|
|
*##else#*
|
|
|
|
*#${util.markdownCellFormat($docString)}#*
|
|
|
|
*##end#*
|
|
|
|
*##end
|
|
|
|
|
|
|
|
<a id="#${ruleName}"></a>
|
|
|
|
|
|
|
|
#[[##]]# ${ruleName}
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
${util.ruleSummary($ruleName, $ruleInfo)}
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
${ruleInfo.docString}
|
|
|
|
|
|
|
|
#[[###]]# **Attributes**
|
|
|
|
|
|
|
|
#if (!$ruleInfo.getAttributeList().isEmpty())
|
|
|
|
|
|
|
|
| Name | Description | Type | Mandatory | Default |
|
|
|
|
| :------------- | :------------- | :------------- | :------------- | :------------- |
|
|
|
|
#foreach ($attribute in $ruleInfo.getAttributeList())
|
|
|
|
| <a id="${ruleName}-${attribute.name}"></a>$attribute.name | #if(!$attribute.docString.isEmpty()) #markdownCellFormatNoEscapeHtml( $attribute.docString ) #else - #end | ${util.attributeTypeString($attribute)} | ${util.mandatoryString($attribute)} | $attribute.defaultValue |
|
|
|
|
#end
|
2023-02-17 18:12:41 +00:00
|
|
|
#end
|