On Wednesday, 31 July 2019 at 06:52:46 UTC, 0xEAB wrote:
On Wednesday, 31 July 2019 at 06:30:03 UTC, BoQsc wrote:
This can be solved by using single quotes in the argument
content places
#!/usr/bin/env rdmd
import std.stdio;
void main()
{
writeln("Content-type: text/html");
writeln("");
writeln("<body style='background: green'>CGI D
Example</body>");
}
Does the job but is a bad fix.
Use `` quotes for the string literal instead.
Further info: https://dlang.org/spec/lex.html#wysiwyg
- Elias
I wasn't aware of Wysiwyg Strings, thanks,
seems to work very well.
#!/usr/bin/env rdmd
import std.stdio;
void main()
{
writeln(`Content-type: text/html`);
writeln(``);
writeln(`<body style="background: lightgreen">CGI D
Example</body>`);
}