Text to HTML: Difference between revisions

m
→‎{{header|Wren}}: Minor tidy including usage now of raw string.
m (syntax highlighting fixup automation)
m (→‎{{header|Wren}}: Minor tidy including usage now of raw string.)
 
Line 1,003:
{{trans|Go}}
{{libheader|Wren-pattern}}
<syntaxhighlight lang="ecmascriptwren">import "./pattern" for Pattern
Note that Wren doesn't support any form of raw string so we need to construct the sample text by concatenating strings for each paragraph.
<syntaxhighlight lang="ecmascript">import "/pattern" for Pattern
 
var t = """ Sample Text
 
" Sample Text\n\n" +
"This is an example of converting plain text to HTML which demonstrates extracting a title and escaping certain characters within bulleted and numbered lists.\n\n" +
 
"* This is a bulleted list with a less than sign (<)\n\n" +
"* And thisThis is itsa secondbulleted linelist with a greaterless than sign (><)\n\n" +
 
"A 'normal' paragraph between the lists.\n\n" +
* And this is its second line with a greater than sign (>)
"1. This is a numbered list with an ampersand (&)\n\n" +
 
"2. \"Second line\" in double quotes\n\n" +
"A 'normal' paragraph between the lists.\n\n" +
"3. 'Third line' in single quotes\n\n" +
 
"That's all folks."
"*1. This is a bulletednumbered list with aan less than signampersand (<&)\n\n" +
 
"2. \"Second line\" in double quotes\n\n" +
 
"3. 'Third line' in single quotes\n\n" +
 
"That's all folks."""
 
// prefer the standard &quot; for escaping a double-quote character rather than Go's &#34;
9,488

edits