WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Mr5o1
    Member
    Posted 1 year 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', [
            'li[text=Hello]',
            'li[text=World]'
        ]
    ];

    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:
    http://i.imgur.com/EpgfI.png

    is it supposed to look like that?

    Thanks,

    http://wordpress.org/extend/plugins/embed-github-gist/

  2. dflydev
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

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

    http://twitpic.com/bleavg

  4. theantichris
    Member
    Posted 1 year ago #

    I'm having the same issue.

  5. dflydev
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

    Big issue with 3.5, please check.

  7. iamsk
    Member
    Posted 1 year ago #

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

  8. cassiel
    Member
    Posted 1 year 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

About this Topic