Closed louis030195 closed 1 year ago
When I add this to Sussudio.md:
#code_comment_not_tag
#code-comment-not-tag
The current test test_tags_index
still passes, as desired.
But when I add this:
# #code_comment_not_tag
# #code-comment-not-tag
The code processes those Python comments as two tags.
Via _get_html_from_md_file
function, the HTML was getting recognised as:
<p>```python</p>
<h1>#code_comment_not_tag</h1>
<h1>#code-comment-not-tag</h1>
<p>```</p>
Adding superfences
extension (https://github.com/mfarragher/obsidiantools/commit/228ec4bfa6637551ea7fa4e28ff1fb82c53f740e), this is better, as everything in the code
tag gets wiped out as expected:
<div class="highlight"><pre><span></span><code><span class="c1"># #code_comment_not_tag</span>
<span class="c1"># #code-comment-not-tag</span>
</code></pre></div>
Tests pass for this now: https://github.com/mfarragher/obsidiantools/commit/073881b94da5c7d429b9e5f926027088833d33c6
I added an if
statement in there, like in the OP.
As a placeholder. I think code blocks should be ignored for tags? What do you think?