You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although newline character is ignored in html, i want use jquery-templ to convert a text file.
The newline character is important in the conversion result. And the newline after }} generate alot of blank lines in the result.
I improved it by modify fregment of function buildTmplFn() from
Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.
Although newline character is ignored in html, i want use jquery-templ to convert a text file.
The newline character is important in the conversion result. And the newline after }} generate alot of blank lines in the result.
I improved it by modify fregment of function buildTmplFn() from
.replace( /(['])/g, "$1" )
.replace( /[\r\t\n]/g, " " )
.replace( /[\t]/g, " " )
.replace( /${([^}])}/g, "{{= $1}}" )
.replace( /{{(/?)(\w+|.)(?:(((?:[^}]|}(?!}))?)?))?(?:\s+(.?)?)?((((?:[^}]|}(?!}))?)))?\s*}}/g,
function( all, slash, type, fnargs, target, parens, args ) {
......
}) +
to
.replace( /(['])/g, "$1" )
//.replace( /[\r\t\n]/g, " " )
.replace( /[\t]/g, " " )
.replace( /${([^}])}/g, "{{= $1}}" )
.replace( /{{(/?)(\w+|.)(?:(((?:[^}]|}(?!}))?)?))?(?:\s+(.?)?)?((((?:[^}]|}(?!}))?)))?\s_}}\s_/g,
function( all, slash, type, fnargs, target, parens, args ) {
......
}).replace( /\r/g, "\r" )
.replace( /\n/g, "\n" ) +
Just suggestion because i used it in abnormal condication.
The text was updated successfully, but these errors were encountered: