Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Code snippets

Return to Member Forum

  • Author
    Posts
    • #78316
      Peter Kahrel
      Participant

      How does one insert code examples in a post on this forum? I tried < code > . . . < / code > with mixed success. I didn’t manage to add indents, and quotes are always inserted as so-called smart quotes (I don’t think they’re smart at all).

      Thanks,

      Peter

    • #78320
      David Blatner
      Keymaster

      Hi Peter,
      The code tag should work for you.

      For example, this sentence is in inside a code tag
      As is this one.

      As for the smart quotes… I’m not sure we can get around that, but I will investigate.

      • #78321
        David Blatner
        Keymaster

        Another test: I am typing text with "straight quotes" inside this 'code tag'

      • #78322
        David Blatner
        Keymaster

        Hey! Quotes inside code tags are not converted to curly/smart/typographers quotes!

        (But “this text” should be ‘converted’ because it’s not in a code tag.)

      • #78330
        Peter Kahrel
        Participant

        Anothertest. . .

        I am typing text with "straight quotes" inside this 'code tag'
        Pasted things:
        xxx "xxx" xxx 'xxx'
          indent with nobreaking spaces
        indent with spaces
        indent with tabs

        Text

      • #78331
        Peter Kahrel
        Participant

        Well, why it didn’t work earlier with those quotes I don’t know. Seems to work fine, David, thatnks for trying that.
        Indents have to be done with non-breaking spaces:   as normal spaces and tabs don’t work.

    • #78333
      David Blatner
      Keymaster

      Testing another solution I just read:

      What if I type this in a pre tag instead of code?
             This is indented with spaces.
      	this is indented with a tab
      This is not indented
      • #78334
        David Blatner
        Keymaster

        Ah! so the

        pre tag seems to work and allows indenting with "tabs" and 'regular spaces'

        (now testing for quotes).

      • #78345
        Peter Kahrel
        Participant
        . . .

        it is then! Thanks!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
Forum Ads