Skip to content

Commit

Permalink
Prevent duplicates in YAML output.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Mar 21, 2016
1 parent c8c1f5d commit 658f12e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/render/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,20 @@ function render(ast) {

//console.error(depth);

this.out(repeat(this.indent, depth));
if(entering) {
this.out(repeat(this.indent, depth));

//if(!isDoc) {
this.out('- ');
//}

this.out(type + ': ');
if(this.compact && node._literal) {
this.str(type, node._literal, depth);
}
this.cr();
this.out(type + ': ');
if(this.compact && node._literal) {
this.str(type, node._literal, depth);
}
this.cr();

if(!this.compact && !isDoc) {
this.properties(node, depth);
if(!this.compact && !isDoc) {
this.properties(node, depth);
}
}

// close document
Expand Down

0 comments on commit 658f12e

Please sign in to comment.