On Saturday, 10 January 2015 at 17:39:17 UTC, Adam D. Ruppe wrote:
Though, that's still a library thing rather than a language
thing.
It is a language-library-platform thing, things like how
composable the eco system is would be interesting to compare. But
it would be unfair to require a minimalistic language to not use
third party libraries. One should probably require that the
library used is generic (not a spider-framework), not using FFI,
mature and maintained?
document.parseGarbage(response.contentText);
// Uri.basedOn returns a new absolute URI based on
something else
foreach(a; document.querySelectorAll("a[href]"))
writeln(Uri(a.href).basedOn(base));
}
Nice and clean code; does it expand html entities ("&")?
The HTML5 standard has improved on HTML4 by now being explicit on
how incorrect documents shall be interpreted in section 8.2. That
ought to be sufficient, since that is what web browsers are
supposed to do.
http://www.w3.org/TR/html5/syntax.html#html-parser