Last active
February 13, 2021 15:27
-
-
Save abilogos/8cbae9d665bfdfca1f50d68bd78bb1f7 to your computer and use it in GitHub Desktop.
A Template to have Multiline String without appending strings
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
//its a js hack for having multiline string like python`s ''' multi line ''' | |
//source: https://tomasz.janczuk.org/2013/05/multi-line-strings-in-javascript-and.html | |
var html = (function () {/* | |
multiline with | |
white spaces | |
and newlines | |
*/}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[more details] (https://tomasz.janczuk.org/2013/05/multi-line-strings-in-javascript-and.html)