I have a two-level ordered list, and the output is identical to this post. My output is fine and looks how it should. My issue is the normal 'highlighting' of chunks disappears with 8 spaces, and the RMD source no longer 'recognizes' the chunks as such. The blank lines before and after the chunks are also indented (I found that I had to do this to get the desired output).
To illustrate this, I'm sharing the image below. The highlight is missing, and that same cursor position in other chunks gives a little button next to line:character in the bottom left rather than '(Top Level)'. If I bring the chunk indention in (from 8 spaces to 4) the code no longer lines up with the list in the output.
Is there any way to remedy this? Haven't had any luck searching online or going through the documentation. (If interested, the example comes from ISLR, Section 2.4, Exercise 8.)