Skip to content

Commit

Permalink
Update default templates' angle bracket escaping
Browse files Browse the repository at this point in the history
Also update the angle bracket test.

The new default input templates match those housed under Skydoc repository (bazelbuild/skydoc@41c28e4). These new input templates no longer escape strings inside of table cells; escaping strings in table cells was a mistake, as it left no way to format the text in these cells.

RELNOTES: None.
PiperOrigin-RevId: 260511196
  • Loading branch information
blossommojekwu authored and copybara-github committed Jul 29, 2019
1 parent af489f2 commit 9a5883f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ${util.htmlEscape($funcInfo.docString)}

#if (!$param.docString.isEmpty())
<p>
${util.htmlEscape($param.docString.trim())}
${param.docString.trim()}
</p>
#end
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ${util.htmlEscape($providerInfo.docString)}
<tr id="${providerName}-${field.name}">
<td><code>${field.name}</code></td>
<td>
<p>${util.htmlEscape($field.docString)}</p>
<p>${field.docString}</p>
</td>
</tr>
#end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ${util.htmlEscape($ruleInfo.docString)}
${util.attributeTypeString($attribute)}; ${util.mandatoryString($attribute)}
#if (!$attribute.docString.isEmpty())
<p>
${util.htmlEscape($attribute.docString.trim())}
${attribute.docString.trim()}
</p>
#end
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Rule with &lt;brackets&gt;
<td>
String; optional
<p>
Args with &lt;brackets&gt;
Args with some <b>formatting</b>
</p>
</td>
</tr>
Expand Down Expand Up @@ -61,19 +61,19 @@ Information with &lt;brackets&gt;
<tr id="bracketuse-foo">
<td><code>foo</code></td>
<td>
<p>A string &lt;representing foo&gt;</p>
<p>A string representing foo</p>
</td>
</tr>
<tr id="bracketuse-bar">
<td><code>bar</code></td>
<td>
<p>A string &lt;representing bar&gt;</p>
<p>A string representing bar</p>
</td>
</tr>
<tr id="bracketuse-baz">
<td><code>baz</code></td>
<td>
<p>A string &lt;representing baz&gt;</p>
<p>A string representing baz</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -106,7 +106,7 @@ This rule runs checks on &lt;angle brackets&gt;.
<td>
required.
<p>
an arg with &lt;brackets&gt; in the docstring.
an arg with <b>formatted</b> docstring.
</p>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def bracket_function(name):
This rule runs checks on <angle brackets>.
Args:
name: an arg with <brackets> in the docstring.
name: an arg with <b>formatted</b> docstring.
Returns:
some <angled> brackets
Expand All @@ -17,9 +17,9 @@ def bracket_function(name):
bracketuse = provider(
doc = "Information with <brackets>",
fields = {
"foo": "A string <representing foo>",
"bar": "A string <representing bar>",
"baz": "A string <representing baz>",
"foo": "A string representing foo",
"bar": "A string representing bar",
"baz": "A string representing baz",
},
)

Expand All @@ -31,8 +31,8 @@ my_anglebrac = rule(
doc = "Rule with <brackets>",
attrs = {
"useless": attr.string(
doc = "Args with <brackets>",
default = "Find <brackets>",
doc = "Args with some <b>formatting</b>",
default = "Find brackets",
),
},
)

0 comments on commit 9a5883f

Please sign in to comment.