Created
October 15, 2018 18:51
-
-
Save backupbrain/b992459191ef74d47af92365bec0ba49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tokenizer.prototype.resetNewlines = function(text) { | |
nlText = text.replace(/\n/g, "").replace(/\;/g, ";\n"); | |
nlText = nlText.replace(/\}/g, "}\n").replace(/\{/g, "\n{\n"); | |
nlText = nlText.replace(/\n[ ]+/g, "\n"); | |
nlText = nlText.replace(/\n$/, ""); | |
return nlText; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment