Skip to content

Problem with nested ordered lists: recognised as paragrapg #406

@jerry1970

Description

@jerry1970

Trying to parse a table of contents with nested ordered lists is not going well.

I have a very old (November 1996) FAQ in plain text that starts like this:

  1) IQ ON INTERNET

  1.1) It All Posts Here Mailing List

    1.1.1) What is 'It All Posts Here' ?
    1.1.2) A brief history of the list
    1.1.3) IAPH Administrivia

When I rewrite that into this:

1. IQ ON INTERNET
   1. It All Posts Here Mailing List
      1. What is 'It All Posts Here' ?
      1. A brief history of the list
      1. IAPH Administrivia

the results are the same: the third level is parsed as a paragraph.

I assume this has to do with what is describer in processListItems as "The $this->list_level global keeps track of when we're inside a list.". With blank lines in between the nested level is parsed as a code block because of the indentation.

How can I prevent this from happening for the table of contents?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions