{"record":{"id":"baf8b8cf82ad38f1","repo":"swc-project/swc","slug":"non-space-character-in-colgroup-element","errorCode":null,"errorMessage":"Non-space character in \"colgroup\" element","messagePattern":"Non-space character in \"colgroup\" element","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_html_parser/src/parser/mod.rs","lineNumber":5189,"sourceCode":"                    // An end-of-file token\n                    // Process the token using the rules for the \"in body\" insertion mode.\n                    Token::Eof => {\n                        self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;\n                    }\n                    // Anything else\n                    //\n                    // If the current node is not a colgroup element, then this is a parse error;\n                    // ignore the token.\n                    //\n                    // Otherwise, pop the current node from the stack of open elements.\n                    //\n                    // Switch the insertion mode to \"in table\".\n                    //\n                    // Reprocess the token.\n                    _ => match self.open_elements_stack.items.last() {\n                        Some(node) if !is_html_element!(node, \"colgroup\") => match token {\n                            Token::Character { .. } => {\n                                self.errors.push(Error::new(\n                                    token_and_info.span,\n                                    ErrorKind::NonSpaceCharacterInColumnGroup,\n                                ));\n                            }\n                            _ => {\n                                self.errors.push(Error::new(\n                                    token_and_info.span,\n                                    ErrorKind::GarbageInColumnGroup,\n                                ));\n                            }\n                        },\n                        _ => {\n                            self.open_elements_stack.pop();\n                            self.insertion_mode = InsertionMode::InTable;\n                            self.process_token(token_and_info, None)?;\n                        }\n                    },\n                }","sourceCodeStart":5171,"sourceCodeEnd":5207,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_html_parser/src/parser/mod.rs#L5171-L5207","documentation":"HTML parse error in the 'in column group' insertion mode: a non-whitespace character token was found inside <colgroup>, where only col/template/whitespace-ish tokens are allowed. The error is recorded; if the current node is colgroup it is popped and the token is reprocessed in 'in table', otherwise it is ignored.","triggerScenarios":"Thrown at crates/swc_html_parser/src/parser/mod.rs:5189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove text content from inside <colgroup>; it may only contain <col> and <template>","Move the content into a <tbody>/<tr>/<td> structure instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}