Skip to content

Commit

Permalink
fix(tree): replace 'new line'
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemM committed Oct 30, 2021
1 parent 6d9b8e1 commit 0e4eccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const parserTree = new ProstoTree<TProstoParserContext | string | 0>({
children: '_content',
renderLabel: (node) => {
if (typeof node === 'string') {
return styles.text('«' + node + '»')
return styles.text('«' + node.replace(/\n/g, '\\n') + '»')
} else if (typeof node === 'object') {
let keys = ''
Object.keys(node).filter(key => key[0] !== '_' && key !== 'toTree').forEach(key => {
Expand Down

0 comments on commit 0e4eccf

Please sign in to comment.