3

I am trying to share a stack trace on a question that I am asking on stack overflow. Looking around, I found these suggestions:

  • Indent the text with four spaces, but this didn't work.
  • Include the whole stack trace in `...` block. This worked, but now each line was on its own, and it looked real ugly.

Obviously, others are already doing this, but when I try to research for it, I am not getting any useful tips.

Edit: I saw the comment about using <pre>..</pre> tags, and I tried them for the stack trace on my other question, and this was exactly what I was looking for. I was using <code>..</code> before, but that didn't work as nicely (probably due to the fact that the stack trace is not really a code snippet in an actual programming language).

Edit2: I found out what was wrong with my previous tests with four leading spaces. According to the documentation, the code block has to be preceded by an empty line, but I didn't have such an empty line.

2
  • You can put the text of the stack trace in <pre> tags. Dec 23, 2015 at 19:12
  • 2
    "Indent the text with four spaces, but this didn't work." Then you did something wrong. Using 4 spaces works, also for stacktraces.
    – Tom
    Dec 23, 2015 at 22:55

0

Browse other questions tagged .