Skip to content

Commit

Permalink
add soft breaks to New Line logic (#1)
Browse files Browse the repository at this point in the history
In our application we sometimes get substation alpha authors that put n at
the end of each line in the dialogue. Usually we would expect that they would
use N instead.  So we will add that to the conditions checked by the parse-
newLine function so that this doesn'
t cause a breaking behavior of actually printing out the literal n at
the end of each line of dialogue.
  • Loading branch information
joshuabrown-ellation authored May 23, 2017
1 parent e0c6300 commit 16041ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
/npm-debug.log

/src/version.ts

.idea
2 changes: 1 addition & 1 deletion src/parser/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class ParserRun {
parse_newline(parent: ParseNode): ParseNode | null {
const current = new ParseNode(parent);

if (this.read(current, "\\N") === null) {
if (this.read(current, "\\N") === null && this.read(current, "\\n") === null) {
parent.pop();
return null;
}
Expand Down

0 comments on commit 16041ae

Please sign in to comment.