[Pas2js] multiline string literals

warleyalex warleyalex at yahoo.com.br
Fri Feb 22 21:25:54 CET 2019


   const TEMPLATE1 = #'
      <!DOCTYPE html>
      <html manifest="app.manifest">
      <head>
        <meta charset="UTF-8" />
      	<meta name="apple-mobile-web-app-capable" content="yes">
      	<meta name="mobile-web-app-capable" content="yes">
      	<meta name="viewport" content="width=device-width, maximum-scale=1.0,
initial-scale=1.0, user-scalable=no"/>
        <link rel="manifest" href="webapp.json">
      </head>
      <body>
       <tag>
         <br>
       </tag>
      </body>

      </html>';

      console.log(TEMPLATE1);

transpiles to this JS:

console.log("<!DOCTYPE html>\r\n<html
manifest=\"app.manifest\">\r\n<head>\r\n  <meta charset=\"UTF-8\"
\/>\r\n\t<meta name=\"apple-mobile-web-app-capable\"
content=\"yes\">\r\n\t<meta name=\"mobile-web-app-capable\"
content=\"yes\">\r\n\t<meta name=\"viewport\" content=\"width=device-width,
maximum-scale=1.0, initial-scale=1.0, user-scalable=no\"\/>\r\n  <link
rel=\"manifest\" href=\"webapp.json\">\r\n<\/head>\r\n<body>\r\n <tag>\r\n  
<br>\r\n <\/tag>\r\n<\/body>\r\n\r\n<\/html>");



--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list