Exactly how do I use the sourcecode shortcode?

  • Author
    Posts
  • #143610

    catena
    Member

    I can’t get the sourcecode shortcode to work. In the following, taken from the Code panel of a test post, the “sourcecode” section comes up as plain text (wrong), the “kyte.tv” section embeds the video (right), and the “code” section looks right. I got LaTeX embedding to work. What am I doing wrong here? Could you provide me with something to cut and paste into my Code panel that will format code the way it was introduced?

    [sourcecode language=’css’]
    #button {
    font-weight: bold;
    border: 2px solid #fff;
    }
    [/sourcecode]
    
    [kyte.tv 6118]
    
    <code>
    #button {
    font-weight: bold;
    border: 2px solid #fff;
    }
    </code>
    #143945

    catena
    Member

    I got it to work with James’ csharp example in this thread, but I don’t know what the difference is.

    https://en.forums.wordpress.com/topic.php?id=15241&page&replies=35

    #143946

    catena
    Member

    And I got it to work with my own sample. Still don’t know what I did wrong before.

    #143949

    timethief
    Member

    Is this issue “resolved”? If so could you please mark it so?

    #144059

    catena
    Member

    It shows up as “resolved” to me.

    #144061

    timethief
    Member

    Yes you’re right today it’s marked “resolved”. :)

    #144251

    tlundqvist
    Member

    I had similar problem. It seems to be a cut-and-paste problem. Don’t copy the example, enter the quotes yourself: ‘css’ or “css” otherwise the wrong quote is used. See: https://en.forums.wordpress.com/topic.php?id=15761&page&replies=2#post-116095

The topic ‘Exactly how do I use the sourcecode shortcode?’ is closed to new replies.