Embed GitHub Gist
bad (spaced out) formatting? (8 posts)

  1. Mr5o1
    Posted 4 years ago #

    Hey.. thanks for the great plugin. I've been playing around with it today, but my gist's are imported with formatting (and HTML markup) that just doesn't seem quite right.

    For example the following 6 line gist:

    var template = [
        'ul.listClass#listId', [

    Is marked up like so:

    <div class='line' id='LC1'><span class="kd">var</span> <span class="nx">template</span> <span class="o">=</span> <span class="p">[</span></div>
    <div class='line' id='LC2'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">'ul.listClass#listId'</span><span class="p">,</span> <span class="p">[</span></div>
    <div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">'li[text=Hello]'</span><span class="p">,</span></div>
    <div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">'li[text=World]'</span></div>
    <div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">]</span></div>
    <div class='line' id='LC6'><span class="p">];</span></div>

    just seems like a lot of element's for not much code.. however, the real problem is that it's rendered with double lines.. like so:

    is it supposed to look like that?



  2. dflydev
    Plugin Author

    Posted 3 years ago #

    I apologize for the late response. I don't control the HTML or the stylesheets that actually come from GitHub. I've seen some cases in the past where the HTML looks wonky but I think it was just a bad push from GitHub and it cleared itself up over time. Have you noticed this has gotten better or is it still looking wonky?

  3. cassiel
    Posted 3 years ago #

    Seems broken in WordPress 3.5: double-spaced lines. The line numbers suggest it's a problem in the Gist generation itself.


  4. theantichris
    Posted 3 years ago #

    I'm having the same issue.

  5. dflydev
    Plugin Author

    Posted 3 years ago #

    I'm not sure how much more I can do at this point. I have the plugin no longer including rendered HTML. You will only ever get plain

    code or you will be seeing exactly what GitHub is sending in its embed code.

  6. iamsk
    Posted 3 years ago #

    Big issue with 3.5, please check.

  7. iamsk
    Posted 3 years ago #

    My mistake, I change my shortcode by using javascript embedded code. And it works fine! Thanks!

  8. cassiel
    Posted 3 years ago #

    Re: the double-spacing: clutching at straws here, but is there a chance that gists created on the Mac are being presented CRLF line breaks? I should test this on my staging site...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Embed GitHub Gist
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic