github.com/servernoj/jade@v0.0.0-20231225191405-efec98d19db1/testdata/v2/plain-text.go (about) 1 // Code generated by "jade.go"; DO NOT EDIT. 2 3 package jade 4 5 import ( 6 pool "github.com/valyala/bytebufferpool" 7 ) 8 9 func Jade_plaintext(buffer *pool.ByteBuffer) { 10 11 buffer.WriteString(`<p>This is plain old <em>text</em> content.</p><html><body><p>Indenting the body tag here would make no difference.</p><p>HTML itself isn't whitespace-sensitive.</p></body></html><p>The pipe always goes at the beginning of its own line,not counting indentation.</p><script> if (usingPug) 12 console.log('you are awesome') 13 else 14 console.log('use pug') 15 16 </script><div><p>This text belongs to the paragraph tag.</p><br/> 17 This text belongs to the div tag. 18 19 </div>You put the em<em>pha</em>sis on the wrong syl<em>la</em>ble.<a>...sentence ending with a link</a>.Don't<button id="self-destruct">touch</button>me!<p> Using regular tags can help keep your lines short, 20 but interpolated tags may be easier to <em>visualize</em> 21 whether the tags and text are whitespace-separated. 22 23 </p>Hey, check out <a href="http://example.biz/kitteh.png">this picture</a> of my cat!<script>`) 24 25 buffer.WriteString(` const newWS = (url) => { 26 let socket = new WebSocket(url) 27 socket.onopen = _ => console.log("Open") 28 socket.onmessage = (event) => console.log(` + "`" + `Message: ${event.data}` + "`" + `) 29 socket.onerror = (error) => console.error(` + "`" + `Error: ${error.message}` + "`" + `) 30 socket.onclose = (event) => { 31 if (event.wasClean) console.log(` + "`" + `Clean; code: ${event.code} ${event.reason}` + "`" + `) 32 else console.log(` + "`" + `Err; code: ${event.code} ${event.reason}` + "`" + `) 33 } 34 return socket 35 }`) 36 buffer.WriteString(`</script>`) 37 38 }