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

Inappropriate quoting in listing and literal blocks #751

Closed
pjanx opened this issue Sep 6, 2020 · 3 comments · Fixed by #758
Closed

Inappropriate quoting in listing and literal blocks #751

pjanx opened this issue Sep 6, 2020 · 3 comments · Fixed by #758
Assignees
Milestone

Comments

@pjanx
Copy link
Contributor

pjanx commented Sep 6, 2020

Current master (7050c34):

 <b>*</b> &apos; &amp;

```
<b>*</b> &apos; &amp;
```

gives

<div class="literalblock">
<div class="content">
<pre><b>*</b> &apos; &amp;</pre>
</div>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code>&lt;b&gt;*&lt;/b&gt; &amp;apos; &amp;</code></pre>
</div>
</div>

i.e., in the browser:

* ' &

<b>*</b> &apos; &

Asciidoctor:

<div class="literalblock">
<div class="content">
<pre>&lt;b&gt;*&lt;/b&gt; &amp;apos; &amp;amp;</pre>
</div>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code>&lt;b&gt;*&lt;/b&gt; &amp;apos; &amp;amp;</code></pre>
</div>
</div>
@xcoulon
Copy link
Member

xcoulon commented Sep 6, 2020

thanks for reporting this @pjanx, I will take a look at it

@xcoulon xcoulon self-assigned this Sep 6, 2020
@xcoulon
Copy link
Member

xcoulon commented Sep 6, 2020

I suspect this is due to the way literal blocks are parsed (or their lack of support for substitutions)

@xcoulon xcoulon added this to the v0.5.0 milestone Sep 6, 2020
xcoulon added a commit to xcoulon/libasciidoc that referenced this issue Sep 29, 2020
Verifies that special characters are properly
handled in paragraphs and delimited blocks

Fixes bytesparadise#751

Signed-off-by: Xavier Coulon <[email protected]>
@xcoulon
Copy link
Member

xcoulon commented Sep 29, 2020

@pjanx sorry for the late response, I was caught in #558 🤯

I believe that with the work done for #558 and #597, the issue your reported was fixed.
With the following source:

<b>*</b> &apos; &amp;

```
<b>*</b> &apos; &amp;
```

we now have the following output:

<div class="paragraph">
<p>&lt;b&gt;*&lt;/b&gt; &amp;apos; &amp;amp;</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code>&lt;b&gt;*&lt;/b&gt; &amp;apos; &amp;amp;</code></pre>
</div>
</div>

This is what #758 verifies.

xcoulon added a commit that referenced this issue Sep 29, 2020
Verifies that special characters are properly
handled in paragraphs and delimited blocks

Fixes #751

Signed-off-by: Xavier Coulon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants