packages/@textlint/text-to-ast/src/plaintext-parser.js
function createParagraph(nodes) {
    const firstNode = nodes[0];
    const lastNode = nodes[nodes.length - 1];
    return {
        type: Syntax.Paragraph,
        raw: nodes
            .map(function(node) {
                return node.raw;
            })
            .join(""),
        range: [firstNode.range[0], lastNode.range[1]],
        loc: {
            start: {
                line: firstNode.loc.start.line,
                column: firstNode.loc.start.column
            },
            end: {
                line: lastNode.loc.end.line,
                column: lastNode.loc.end.column
            }
        },
        children: nodes
    };
}
function createParagraph(nodes) {
    const firstNode = nodes[0];
    const lastNode = nodes[nodes.length - 1];
    return {
        type: Syntax.Paragraph,
        raw: nodes
            .map(function(node) {
                return node.raw;
            })
            .join(""),
        range: [firstNode.range[0], lastNode.range[1]],
        loc: {
            start: {
                line: firstNode.loc.start.line,
                column: firstNode.loc.start.column
            },
            end: {
                line: lastNode.loc.end.line,
                column: lastNode.loc.end.column
            }
        },
        children: nodes
    };
}
function createParagraph ( nodes ) { const firstNode = nodes [ 0 ] ; const lastNode = nodes [ nodes . length - 1 ] ; return { type : Syntax . Paragraph , raw : nodes . map ( function ( node ) { return node . raw ; } ) . join ( "" ) , range : [ firstNode . range [ 0 ] , lastNode . range [ 1 ] ] , loc : { start : { line : firstNode . loc . start . line , column : firstNode . loc . start . column } , end : { line : lastNode . loc . end . line , column : lastNode . loc . end . column } } , children : nodes } ; }
create paragraph node from TxtNodes
@param {[TxtNode]} nodes
@returns {TxtNode} Paragraph node
create paragraph node from TxtNodes