From cee947ca9ee55f66f00697a2355ab24929147a83 Mon Sep 17 00:00:00 2001 From: Marco Santos <101365429+marcosantos98@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:28:21 +0000 Subject: [PATCH] net.html: add note to parse and parse_file, that they will produce a DOM with lowercased tag names (#19720) --- vlib/net/html/html.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/net/html/html.v b/vlib/net/html/html.v index 293b64371474d3..4a101f1058442e 100644 --- a/vlib/net/html/html.v +++ b/vlib/net/html/html.v @@ -3,6 +3,8 @@ module html import os // parse parses and returns the DOM from the given text. +// Note: this function will parse all tags to lowercase. +// E.g. content is converted to content pub fn parse(text string) DocumentObjectModel { mut parser := Parser{} parser.parse_html(text) @@ -10,6 +12,8 @@ pub fn parse(text string) DocumentObjectModel { } // parse_file parses and returns the DOM from the contents of a file. +// Note: this function will parse all tags to lowercase. +// E.g. content is converted to content pub fn parse_file(filename string) DocumentObjectModel { content := os.read_file(filename) or { return DocumentObjectModel{ root: &Tag{}