6

Here is a code block:

HappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCode

Now here is a code block after a numbered list (with 8 spaces for indentation:

  1. Test

    HappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCode
    

Notice how if you look at this question on the mobile app (for iOS), the first code block is all one line with scrolling, but the second breaks so it doesn't scroll:

enter image description here

  • 1
    Which behavior do you want it to stick with? – Nathan Tuggy Feb 23 '16 at 1:21
  • 1
    @NathanTuggy Its not up to me, I'm just making the SE team aware of this – thesecretmaster Feb 23 '16 at 2:01
2

This will be fixed in 1.4.4.3.

This bug was introduced with the fix to Line-Wrapping on Long Words when the following CSS was added to the app:

li code {
    word-wrap: break-word;
}

This made long inline code like HappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCodeHappyCode wrap correctly but broke code blocks.

I'm adding a rule to reset code blocks back to their normal behavior:

li pre code {
    word-wrap: normal;
}

You must log in to answer this question.

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