简体   繁体   中英

Bookdown::gitbook rendering two-level lists to code blocks

Following the Bookdown manual, I'm trying to create a two-level list for gitbook output. Bookdown says I should do this:

+ one
+ two
    + two-a
    + two-b

Which should look like

  • one
  • two
    • two-a
    • two-b

But instead Bookdown seems to be ignoring the + and seeing it as a code chunk because of the indent, and I get this:

  • one
  • two
two-a
two-b

If I just knit the chapter to HTML, the list renders properly. Any ideas what I'm doing wrong?

Depending on which bookdown/pandoc version you're using this may have changed to align with CommonMark.

Try indenting it with only two spaces:

+ one
+ two
  + two-a
  + two-b

From the current MANUAL :

List items may include other lists. In this case the preceding blank line is optional. The nested list must be indented to line up with the first non-space character after the list marker of the containing list item.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM