Skip to content

Empty lines are stripped from comment-blocks too early in the process #74

@erikhagreis

Description

@erikhagreis

For our project we are implementing a custom parser which parses multiline fields with markdown formatting.

Empty lines within markdown denote separation between paragraphs and are therefore important to retain.

I believe this is the part of the code that strips empty lines in the _dss.parse function:

// Remove extra whitespace
block = block.split('\n').filter(function(line) {
    return (_dss.trim(_dss.normalize(line)));
}).join('\n');

For other usecases like markup they could be stripped but for flexibility I think it should be left to the custom parsers instead of the initial 'prep' cycle in DSS.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions