3
\$\begingroup\$
  • here is a list
  • followed by a code block
  • or that´s how it was intended

    sample input sample output 108,174,106 [0.3793103448275862, 0.0, 0.3908045977011494, 0.3176470588235294] 0,0,0 0,0,0,1 170,255,238 33,0,7,0
    0x0088ff 1,0.4667,0,0 [250,235,215] [0,6,14,1.96]

    123456 .7907,.3953,0,.6627

  • apparently I have to use backticks and line breaks instead

    sample input sample output
    108,174,106 [0.3793103448275862, 0.0, 0.3908045977011494, 0.3176470588235294]
    0,0,0 0,0,0,1
    170,255,238 33,0,7,0
    0x0088ff 1,0.4667,0,0
    [250,235,215] [0,6,14,1.96]
    #123456 .7907,.3953,0,.6627

or insert a somehow matching paragraph

sample input      sample output
108,174,106       [0.3793103448275862, 0.0, 0.3908045977011494, 0.3176470588235294]
0,0,0             0,0,0,1
170,255,238       33,0,7,0  
0x0088ff          1,0.4667,0,0
[250,235,215]     [0,6,14,1.96]  
#123456           .7907,.3953,0,.6627

to make it work.

\$\endgroup\$

1 Answer 1

6
\$\begingroup\$
  • Use 8 spaces of indentation if you want the code block as part of the list:

    Like this
    Neat, huh?
    
  • Otherwise, if you want a code block immediately after a list, put an HTML comment (<!-- -->) with no indentation between the list and code block to reset the SE parser to normal paragraph mode.

Check out the markdown of this answer in the
revision history to see what it looks like.
\$\endgroup\$
3
  • \$\begingroup\$ invisble paragraph. bright idea. I have no clue where to look for the revision history; but the explanation is sufficient. \$\endgroup\$
    – Titus
    Commented Jul 1, 2016 at 16:55
  • \$\begingroup\$ @Titus Click on "edited X hours ago" (and then you can look at the markdown there) \$\endgroup\$
    – Martin Ender Mod
    Commented Jul 1, 2016 at 16:56
  • \$\begingroup\$ I accidentally found an even shorter solution today: <!> does the same trick as <!-- --> \$\endgroup\$
    – Titus
    Commented Jul 6, 2016 at 22:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .