mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibWeb: Parse comments in the "in body" insertion mode
This commit is contained in:
parent
bb2f22577b
commit
cba5d59adc
Notes:
sideshowbarker
2024-07-19 06:01:38 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cba5d59adce
1 changed files with 6 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//#define PARSER_DEBUG
|
||||
#define PARSER_DEBUG
|
||||
|
||||
#include <AK/Utf32View.h>
|
||||
#include <LibWeb/DOM/Comment.h>
|
||||
|
@ -632,6 +632,11 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token)
|
|||
return;
|
||||
}
|
||||
|
||||
if (token.is_comment()) {
|
||||
insert_comment(token);
|
||||
return;
|
||||
}
|
||||
|
||||
if (token.is_end_tag() && token.tag_name() == "body") {
|
||||
if (!m_stack_of_open_elements.has_in_scope("body")) {
|
||||
ASSERT_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Reference in a new issue