Skip to content

Commit

Permalink
escaping tags in readme block
Browse files Browse the repository at this point in the history
  • Loading branch information
dsillman2000 committed Nov 26, 2023
1 parent 3d712af commit d3a950c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .metadock/content_schematics/jinja_helpers/md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ md:
>>> env.from_string(
... "{{ md.tablehead('Column 1', 'Column 2', 'Column 3', bold = true) }}"
... ).render()
'| <b>Column 1</b> | <b>Column 2</b> | <b>Column 3</b> |\n| --- | --- | --- |'
'| &lt;b&gt;Column 1&lt;/b&gt; | &lt;b&gt;Column 2&lt;/b&gt; | &lt;b&gt;Column 3&lt;/b&gt; |\n| --- | --- | --- |'
source_file: metadock/env.py
method_name: metadock.env.MetadockMdNamespace.tablehead
signature: "(self, *header_cells: str, bold: bool = False) -> str"
Expand Down
2 changes: 1 addition & 1 deletion .metadock/generated_documents/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ <h4>Jinja macros</h4>
<tr>
<td><pre>md.tablehead</pre></td>
<td><pre>metadock.env.MetadockMdNamespace.tablehead: (self, *header_cells: str, bold: bool = False) -&gt; str</pre></td>
<td>Produces a Markdown table header from the given cells by joining each cell with pipes (&quot;|&quot;) and wrapping the result in pipes, plus adding a header divider row. Cell contents have their pipes escaped with a backslash (&quot;\&quot;). To bold the header cell contents, supply <code>bold = true</code>. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(<br>... &quot;{{ md.tablehead('Column 1', 'Column 2', 'Column 3', bold = true) }}&quot;<br>... ).render()<br>'| <b>Column 1</b> | <b>Column 2</b> | <b>Column 3</b> |\n| --- | --- | --- |'<br></pre></td>
<td>Produces a Markdown table header from the given cells by joining each cell with pipes (&quot;|&quot;) and wrapping the result in pipes, plus adding a header divider row. Cell contents have their pipes escaped with a backslash (&quot;\&quot;). To bold the header cell contents, supply <code>bold = true</code>. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(<br>... &quot;{{ md.tablehead('Column 1', 'Column 2', 'Column 3', bold = true) }}&quot;<br>... ).render()<br>'| &lt;b&gt;Column 1&lt;/b&gt; | &lt;b&gt;Column 2&lt;/b&gt; | &lt;b&gt;Column 3&lt;/b&gt; |\n| --- | --- | --- |'<br></pre></td>
</tr>
<tr>
<td><pre>md.tablerow</pre></td>
Expand Down
2 changes: 1 addition & 1 deletion .metadock/generated_documents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ The following macros are available in the md namespace:
| <pre>md.code</pre> | <pre>metadock.env.MetadockMdNamespace.code: (self, content: str) -> str</pre> | Produces a Markdown inline code block from the given content by wrapping the string in graves (&quot;\`&quot;). <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string("{{ md.code('This is an inline code block.') }}").render()<br>'`This is an inline code block.`'<br></pre> |
| <pre>md.codeblock</pre> | <pre>metadock.env.MetadockMdNamespace.codeblock: (self, content: str, language: str = '') -> str</pre> | Produces a Markdown codeblock from the given content by wrapping the string in triple-graves (&quot;\`\`\`&quot;), and optionally specifies a language. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string("{{ md.codeblock('This is a codeblock.', language = 'sh') }}").render()<br>'```sh\nThis is a codeblock.\n```'<br></pre> |
| <pre>md.list</pre> | <pre>metadock.env.MetadockMdNamespace.list: (self, *items: str) -> str</pre> | Produces a Markdown list from the given content by prepending each line with a dash (&quot;- &quot;). If any of its arguments are, themselves, formatted as Markdown lists, then they are simply indented as sublists. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.list('This is a list.', md.list('This is a sublist,', 'in two pieces.')) }}"<br>... ).render()<br>'- This is a list.\n - This is a sublist,\n - in two pieces.'<br></pre> |
| <pre>md.tablehead</pre> | <pre>metadock.env.MetadockMdNamespace.tablehead: (self, *header_cells: str, bold: bool = False) -> str</pre> | Produces a Markdown table header from the given cells by joining each cell with pipes (&quot;\|&quot;) and wrapping the result in pipes, plus adding a header divider row. Cell contents have their pipes escaped with a backslash (&quot;\\&quot;). To bold the header cell contents, supply `bold = true`. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.tablehead('Column 1', 'Column 2', 'Column 3', bold = true) }}"<br>... ).render()<br>'\| <b>Column 1</b> \| <b>Column 2</b> \| <b>Column 3</b> \|\n\| --- \| --- \| --- \|'<br></pre> |
| <pre>md.tablehead</pre> | <pre>metadock.env.MetadockMdNamespace.tablehead: (self, *header_cells: str, bold: bool = False) -> str</pre> | Produces a Markdown table header from the given cells by joining each cell with pipes (&quot;\|&quot;) and wrapping the result in pipes, plus adding a header divider row. Cell contents have their pipes escaped with a backslash (&quot;\\&quot;). To bold the header cell contents, supply `bold = true`. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.tablehead('Column 1', 'Column 2', 'Column 3', bold = true) }}"<br>... ).render()<br>'\| &lt;b&gt;Column 1&lt;/b&gt; \| &lt;b&gt;Column 2&lt;/b&gt; \| &lt;b&gt;Column 3&lt;/b&gt; \|\n\| --- \| --- \| --- \|'<br></pre> |
| <pre>md.tablerow</pre> | <pre>metadock.env.MetadockMdNamespace.tablerow: (self, *row_cells: str) -> str</pre> | Produces a Markdown table row from the given cells by joining each cell with pipes (&quot;\|&quot;) and wrapping the result in pipes. Cell contents have their pipes escaped with a backslash (&quot;\\&quot;). <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.tablehead('Column 1', 'Column 2', 'Column 3') }}\n"<br>... "{{ md.tablerow('Value 1', 'Value 2', 'Value 3') }}"<br>... ).render()<br>'\| Column 1 \| Column 2 \| Column 3 \|\n\| --- \| --- \| --- \|\n\| Value 1 \| Value 2 \| Value 3 \|'<br></pre> |

</details>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ The following macros are available in the md namespace:
| <pre>md.code</pre> | <pre>metadock.env.MetadockMdNamespace.code: (self, content: str) -> str</pre> | Produces a Markdown inline code block from the given content by wrapping the string in graves (&quot;\`&quot;). <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string("{{ md.code('This is an inline code block.') }}").render()<br>'`This is an inline code block.`'<br></pre> |
| <pre>md.codeblock</pre> | <pre>metadock.env.MetadockMdNamespace.codeblock: (self, content: str, language: str = '') -> str</pre> | Produces a Markdown codeblock from the given content by wrapping the string in triple-graves (&quot;\`\`\`&quot;), and optionally specifies a language. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string("{{ md.codeblock('This is a codeblock.', language = 'sh') }}").render()<br>'```sh\nThis is a codeblock.\n```'<br></pre> |
| <pre>md.list</pre> | <pre>metadock.env.MetadockMdNamespace.list: (self, *items: str) -> str</pre> | Produces a Markdown list from the given content by prepending each line with a dash (&quot;- &quot;). If any of its arguments are, themselves, formatted as Markdown lists, then they are simply indented as sublists. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.list('This is a list.', md.list('This is a sublist,', 'in two pieces.')) }}"<br>... ).render()<br>'- This is a list.\n - This is a sublist,\n - in two pieces.'<br></pre> |
| <pre>md.tablehead</pre> | <pre>metadock.env.MetadockMdNamespace.tablehead: (self, *header_cells: str, bold: bool = False) -> str</pre> | Produces a Markdown table header from the given cells by joining each cell with pipes (&quot;\|&quot;) and wrapping the result in pipes, plus adding a header divider row. Cell contents have their pipes escaped with a backslash (&quot;\\&quot;). To bold the header cell contents, supply `bold = true`. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.tablehead('Column 1', 'Column 2', 'Column 3', bold = true) }}"<br>... ).render()<br>'\| <b>Column 1</b> \| <b>Column 2</b> \| <b>Column 3</b> \|\n\| --- \| --- \| --- \|'<br></pre> |
| <pre>md.tablehead</pre> | <pre>metadock.env.MetadockMdNamespace.tablehead: (self, *header_cells: str, bold: bool = False) -> str</pre> | Produces a Markdown table header from the given cells by joining each cell with pipes (&quot;\|&quot;) and wrapping the result in pipes, plus adding a header divider row. Cell contents have their pipes escaped with a backslash (&quot;\\&quot;). To bold the header cell contents, supply `bold = true`. <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.tablehead('Column 1', 'Column 2', 'Column 3', bold = true) }}"<br>... ).render()<br>'\| &lt;b&gt;Column 1&lt;/b&gt; \| &lt;b&gt;Column 2&lt;/b&gt; \| &lt;b&gt;Column 3&lt;/b&gt; \|\n\| --- \| --- \| --- \|'<br></pre> |
| <pre>md.tablerow</pre> | <pre>metadock.env.MetadockMdNamespace.tablerow: (self, *row_cells: str) -> str</pre> | Produces a Markdown table row from the given cells by joining each cell with pipes (&quot;\|&quot;) and wrapping the result in pipes. Cell contents have their pipes escaped with a backslash (&quot;\\&quot;). <br/><br/><pre>>>> from metadock.env import MetadockEnv<br>>>> env = MetadockEnv().jinja_environment()<br>>>> env.from_string(<br>... "{{ md.tablehead('Column 1', 'Column 2', 'Column 3') }}\n"<br>... "{{ md.tablerow('Value 1', 'Value 2', 'Value 3') }}"<br>... ).render()<br>'\| Column 1 \| Column 2 \| Column 3 \|\n\| --- \| --- \| --- \|\n\| Value 1 \| Value 2 \| Value 3 \|'<br></pre> |

</details>
Expand Down

0 comments on commit d3a950c

Please sign in to comment.