Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed code block multiline encoding on quotes/span #61

Merged
merged 8 commits into from
Apr 10, 2018
Merged

Fixed code block multiline encoding on quotes/span #61

merged 8 commits into from
Apr 10, 2018

Conversation

Igoranze
Copy link

Hi,
There was an error on the python-textile module which was rendering codeblocks multiline as follows:

bc.. This is some TEXT inside a "Code BLOCK"

{
  if (JSON) {

    return {"JSON":"value"}
  }
}

Back to 10-4 CAPS 

p.. Some multiline Paragragh

Here is some output!!! "Some" CAPS

Became:

<pre><code>This is some TEXT inside a &quot;Code BLOCK&quot;

{
  if (&lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt;) {

    return {<a href=""><span class="caps">JSON</span></a>&amp;#8220;value&amp;#8221;}
  }
}


Back to 10-4 &lt;span class=&quot;caps&quot;&gt;CAPS&lt;/span&gt; </code></pre>

<p>Some multiline Paragragh

Here is some output!!! &#8220;Some&#8221; <span class="caps">CAPS</span></p>

There are a multiple things wrong here.

<span class='caps'>...</span> (Inside codeblock)
<a href>...</a> (On a word that is not a link)
&amp;#8220; (Double escaping of quotes)

Fixed it by checking the inner_tag of block. If that is equal to 'code' do the same rendering as on the 'pre' tag.

@codecov-io
Copy link

codecov-io commented Apr 10, 2018

Codecov Report

Merging #61 into develop will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           develop    #61   +/-   ##
======================================
  Coverage      100%   100%           
======================================
  Files           12     12           
  Lines         1195   1195           
  Branches       219    219           
======================================
  Hits          1195   1195
Impacted Files Coverage Δ
textile/core.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f44b48...3188b0b. Read the comment docs.

@coveralls
Copy link

coveralls commented Apr 10, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 3188b0b on Igoranze:master into 8b8d973 on textile:master.

@Igoranze Igoranze changed the base branch from master to develop April 10, 2018 08:45
@ikirudennis ikirudennis merged commit 584006d into textile:develop Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants