Skip to content

Commit

Permalink
fix(cst): For block scalars, use an empty string rather than `undefin…
Browse files Browse the repository at this point in the history
…ed` to mark empty values
  • Loading branch information
eemeli committed Apr 2, 2021
1 parent baa0903 commit ab40422
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/parse/cst.ts
Expand Up @@ -65,7 +65,7 @@ export interface BlockScalar {
offset: number
indent: number
props: Token[]
source?: string
source: string
}

export interface BlockMap {
Expand Down
3 changes: 2 additions & 1 deletion src/parse/parser.ts
Expand Up @@ -797,7 +797,8 @@ export class Parser {
type: 'block-scalar',
offset: this.offset,
indent: this.indent,
props: [this.sourceToken]
props: [this.sourceToken],
source: ''
} as BlockScalar
case 'flow-map-start':
case 'flow-seq-start':
Expand Down

0 comments on commit ab40422

Please sign in to comment.