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

Dollar ($) char followed by a single quote makes incorrect output #772

Closed
dvdmarchetti opened this issue Sep 19, 2015 · 1 comment
Closed

Comments

@dvdmarchetti
Copy link

Hi,
I noticed that if I write a block code which contains a single quote next to a $ sign, the highlighted output will be uncorrect.

Example:

<pre><code class="language-php">
&lt;?php echo 'Test variable$'; ?&gt;
</code></pre>

The resulting output will be:

<?php echo 'Test variable
; ?>

Also, when there's other text: the output it's even worse:
Example:

<pre><code class="language-php">
&lt;?php echo 'Test variable$$'; ?&gt;
&lt;?php echo 'Test 2'; &gt;
</code></pre>

Output:

<?php echo 'Test variable
&lt;?php echo 'Test 2'; >
; ?>
&lt;?php echo 'Test 2'; >

To solve this I tried to add another dollar sign so it becomes:
Example:

<pre><code class="language-php">
&lt;?php echo 'Test variable$'; ?&gt;
</code></pre>

The resulting output will be correct:

<?php echo 'Test variable'; ?>

Anyone noticed this behavior?

Have a good day!

@Golmote
Copy link
Contributor

Golmote commented Sep 20, 2015

Wow! That was a nasty bug and it also impacted Handlebars and Smarty. Thank you so much for reporting this. It should be fixed now.

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

No branches or pull requests

2 participants