What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

When writing an answer to a question on my phone, using the Android Chrome browser I cannot include a block of sample code using the 4 spaces formatting rule. It just displays the code as one long sentence. Is there another way of displaying multiple lines of formatted and indented code, and are there any plans to improve the mobile site answer formatting?

This is trying to be a code block
And written on a mobile browser

Edit Ok, I've worked out the problem. Just my lack of knowledge of the correct markdown (and possibly unclear markdown instructions). You have to have a clear line before a 4 space indent to make a code block. I've possibly found another issue with markdown in comments though. Using underscores to make text italic didn't work for me just now from my phone. I'll try again to confirm.

Edit Problem resolved. The Chrome browser for Android does not display italic text. tried it in the standard browser and it looked fine.

share|improve this question
    
I've got a no-repro on my Nexus 7's Chrome-for-Android: meta.stackexchange.com/a/194235/186560. Are you sure you didn't have some other markdown situation preventing your code block, like a preceding list item, which requires eight spaces? –  apsillers Aug 21 '13 at 23:47
    
What happens when you make a code block successfully on a non-mobile computer and then try to edit it in a mobile one? Does the mobile browser destroy the code block when making the edit? Also, could you edit your question with an example? –  apsillers Aug 21 '13 at 23:53
    
I just edited the question on my phone. Added two lines at the bottom that had 4 preceding spaces on each line. As you can see they have come out as normal text. I'll try the make on PC, edit on phone when I get to work in an hour –  James Crawshaw Aug 22 '13 at 5:45
    
Also, that comment I just made should have italic text with the underscore markdown. Looks like that gets removed too. –  James Crawshaw Aug 22 '13 at 5:46
    
this should be italic and this should be bold –  James Crawshaw Aug 22 '13 at 7:06
add comment

1 Answer

up vote 1 down vote accepted
  • To place a code block a clear line must be placed before the code block.
  • Chrome for Android does not display italic text correctly for sans-serif font, so the italic markdown doesn't work. Apparently this is a known bug and Google are working to fix it.
share|improve this answer
add comment

You must log in to answer this question.

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