Skip to content

Instantly share code, notes, and snippets.

@jtratner
Created May 16, 2012 14:49
Show Gist options
  • Save jtratner/2710924 to your computer and use it in GitHub Desktop.
Save jtratner/2710924 to your computer and use it in GitHub Desktop.
Jekyll-rst escapes pullquote html instead of passing it through
layout title date author comments
post
Testing pullquotes
2012-05-16 09:11
Jeffrey Tratner
true

So this is me, starting out.

{% pullquote %} I set up this blog using `Octopress`_ and `jekyll-rst`_ and, after being pretty excited about it, the minute I tried to set it up, it failed to work. The problem was that I use zsh. {" Zsh's globbing interferes with rake tasks phrased like rake new_post["my new post"] "} unless the brackets are escaped. {% endpullquote %}

Not a big problem, I just wrote a zsh function:

<!-- Here's the relevant transformation, note how the pullquote span was converted to html characters -->
<div class="entry-content"><p>So this is me, starting out.</p>
<p><span class=’pullquote-right’ data-pullquote=’Zsh&#8217;s globbing interferes with rake tasks phrased like &#8220;rake new_post[&#8220;my new post&#8221;]&#8220; ‘>
I set up this blog using <a class="reference external" href="http://octopress.org">Octopress</a> and <a class="reference external" href="https://github.com/xdissent/jekyll-rst">jekyll-rst</a> and,
after being pretty excited about it, the minute I tried to set it up, it
failed to work. The problem was that I use zsh.
Zsh&#8217;s globbing interferes with rake tasks phrased like <tt class="docutils literal">rake <span class="pre">new_post[&quot;my</span> new post&quot;]</tt>
unless the brackets are escaped.
</span></p>
<p>Not a big problem, I just wrote a zsh function:</p>
<!-- Here's the relevant transformation, note how the pullquote span was converted to html characters
(I added some spacing and comments to make it easier to read)-->
<div class="entry-content"><p>So this is me, starting out.</p>
<!-- this shouldn't be escaped -->
<p>&lt;span class=&#8217;pullquote-right&#8217; data-pullquote=&#8217;Zsh&amp;#8217;s globbing interferes with rake tasks phrased like &amp;#8220;rake new_post[&amp;#8220;my new post&amp;#8221;]&amp;#8220; &#8216;&gt;
I set up this blog using <a class="reference external" href="http://octopress.org">Octopress</a> and <a class="reference external" href="https://github.com/xdissent/jekyll-rst">jekyll-rst</a> and,
after being pretty excited about it, the minute I tried to set it up, it
failed to work. The problem was that I use zsh.
Zsh&#8217;s globbing interferes with rake tasks phrased like <tt class="docutils literal">rake <span class="pre">new_post[&quot;my</span> new post&quot;]</tt>
unless the brackets are escaped.
&lt;/span&gt;</p> <!-- <--- nor should this -->
<p>Not a big problem, I just wrote a zsh function:</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment