Created
October 9, 2019 19:41
-
-
Save wallace7souza/a5ee19a32ed4081808ecdb11c946ed78 to your computer and use it in GitHub Desktop.
Replace all line breaks by tag <br>
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
str = str.replace(/(?:\r\n|\r|\n)/g, '<br>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment