Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

XML: Indented multiparagraph comments are sometimes rendered as Markdown code #63

@elmimmo

Description

@elmimmo

When writing XML comments that span multiple paragraphs and/or are hardwrapped, preceding spaces or tabs will sometimes produce unintended Markdown code blocks.

IMHO, rocco should look at what character (space or tab) and how many precede of them precede the comment mark <!--, and ignore that same preceding string in subsequent lines of a multiparagraph multiline comment.

You can test with this sample code, although note that tabs or spaces for nesting also produces different output (which should not IMHO):

<?xml version="1.0" encoding="UTF-8"?>

<!-- 
This is a test of a non indented multiparagraph comment.

Two paragraphs but still renders fine
 -->
<bar/>

<!-- This is another test.

Two paragraphs but still renders fine -->
<foo>

    <!-- 
    (1) Yet start indenting things…

    and code is not rendered as expected.
     -->
    <bar/>

    <!-- (2) Yet start indenting things…

    and code is not rendered as expected. -->
    <bar/>

    <!-- (3) Yet start indenting things…

    and code is not rendered as
    expected. -->
    <bar/>
</foo>

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