Skip to content

Equal signs in code blocks get rendered with extra characters #210

@jsbryaniv

Description

@jsbryaniv

I am writing a blog post with some simple code snippets. For example, like this

n_classes = 3
model = DirichletClustering(n_classes)
variables, samples = model.train(data_train)

When they get rendered in the html it looks like this
n_classes ~|=| 3
model ~|=| DirichletClustering(n_classes)
variables, samples ~|=| model.train(data_train)

Evidently the extra characters around the equal sign "~|=|" show up in. the raw HTML when it renders. For example this is what I see when I inspect

<div class="highlight"><pre class="highlight"><code><span class="n">n_classes</span> <span class="o">~|=|</span> <span class="mi">3</span>
<span class="n">model</span> <span class="o">~|=|</span> <span class="n">DirichletClustering</span><span class="p">(</span><span class="n">n_classes</span><span class="p">)</span>
<span class="n">variables</span><span class="p">,</span> <span class="n">samples</span> <span class="o">~|=|</span> <span class="n">model</span><span class="p">.</span><span class="n">train</span><span class="p">(</span><span class="n">data_train</span><span class="p">)</span>
</code></pre></div>

It appears to be that there is some sort of parsing going on that adds these characters around the equal sign before it is sent to the HTML.

I dont know where that would be taking place or why it is necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions