Skip to content

Stringifier Ignores Manually Added Func Child Nodes #69

Description

@jonathantneal
  • Webpack Version: N/A
  • Operating System (or Browser): N/A
  • Node Version: N/A
  • postcss-values-parser Version: 3.0.1

How Do We Reproduce?

Insert a new node into an AST.

importvaluesParserfrom'postcss-values-parser';importPunctuationfrom'postcss-values-parser/lib/nodes/Punctuation';constastValue=valuesParser.parse('rgb(100% 100% 100%)');astValue.nodes[0].nodes.splice(1,0,newPunctuation({value: ','}));astValue.nodes[0].nodes.splice(2,0,newPunctuation({value: ','}));console.log({punctuation: valuesParser.nodeToString(astValue.nodes[0].nodes[1]),root: valuesParser.nodeToString(astValue)});

Expected Behavior

Commas are added.

{punctuation: ',\n',root: 'rgb(100%, 100%, 100%)'}

Actual Behavior

Commas are not added.

{punctuation: ',\n',root: 'rgb(100% 100% 100%)'}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions