Uploaded image for project: 'Markdown Syntax'
  1. Markdown Syntax
  2. MARKDOWN-99

Fenced code blocks lose leading indentation and get an empty language

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 8.10.0
    • 8.9.1
    • markdown/1.2
    • None
    • Unknown

    Description

      When parsing a fenced code block in markdown/1.2:

      • the content is trimmed, so the indentation of the first line (and trailing whitespace) is lost;
      • when no language is specified, the code macro gets an empty language parameter instead of none;
      • the whole info string is used as the language (e.g. java title instead of java).

      Steps to reproduce

      Parse:

      ```
          indented
      x
      ```
      

      Result

      onMacroStandalone [code] [language=] [indented
      x]
      

      Expected

      onMacroStandalone [code] [language=none] [    indented
      x]
      

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: