3

There are three examples that I discovered when trying to post some R code (with carets)

Example 1

  1. List item 1
  2. List item 2
  3. List item 3

    code sample after list of items. it's a two liner make that three

Example 2

  1. List item 1
  2. List item 2
  3. List item 3

    code sample after list of items. it's a two liner make that three

The output above is different than the bug I discovered. Here's an example of output I saw when I decided to report this bug:

without horizontal line, with carets

Example 3

  1. List item 1
  2. List item 2
  3. List item 3

> code sample after list of items.
> it's a two liner
> make that three

The above is what I'd expect to see (without the horizontal line hack).

1
  • without the horizontal line hack: Just replace it by <!-- -->.
    – honk
    Commented May 30, 2018 at 8:34

1 Answer 1

3

You need an extra level of indentation for code samples after lists:

Example 1

  1. List item 1
  2. List item 2
  3. List item 3

    code sample after list of items.
    it's a two liner
    make that three
    

Example 2

  1. List item 1
  2. List item 2
  3. List item 3

    > code sample after list of items.
    > it's a two liner
    > make that three
    

Example 3 - Code flush left

  1. List item 1
  2. List item 2
  3. List item 3
> code sample after list of items.
> it's a two liner
> make that three
2
  • Gah. And the code samples are indented, rather than being at the main level. An HTML comment is needed if you want the displayed code blocks to be flush against the left margin. Commented Feb 9, 2020 at 11:06
  • @Colin'tHart No you don't. See revised answer. Commented Feb 9, 2020 at 11:14

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