1"use strict";(self.webpackChunkmarkuplint_website=self.webpackChunkmarkuplint_website||[]).push([[5741],{3399(e,r,n){n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"migration/v4-to-v5/rules/parse-error","title":"parse-error","description":"Not a rule rename. The built-in parse-error channel in v4 reported fatal ParserErrors only. v5 can also surface non-fatal HTML LS tokenizer / tree-construction errors (parse5 onParseError). Off by default.","source":"@site/docs/migration/v4-to-v5/rules/parse-error.md","sourceDirName":"migration/v4-to-v5/rules","slug":"/migration/v4-to-v5/rules/parse-error","permalink":"/docs/migration/v4-to-v5/rules/parse-error","draft":false,"unlisted":false,"editUrl":"https://github.com/markuplint/markuplint/edit/main/website/docs/migration/v4-to-v5/rules/parse-error.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"sidebar_position":5,"title":"parse-error"},"sidebar":"migration","previous":{"title":"table-row-column-alignment","permalink":"/docs/migration/v4-to-v5/rules/table-row-column-alignment"},"next":{"title":"textlint","permalink":"/docs/migration/v4-to-v5/rules/textlint"}}');var o=n(4848),s=n(8453);const i={sidebar_position:5,title:"parse-error"},a="parse-error",c={},l=[];function d(e){const r={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"parse-error",children:(0,o.jsx)(r.code,{children:"parse-error"})})}),"\n",(0,o.jsxs)(r.p,{children:["Not a rule rename. The built-in ",(0,o.jsx)(r.code,{children:"parse-error"})," channel in v4 reported ",(0,o.jsx)(r.strong,{children:"fatal"})," ",(0,o.jsx)(r.code,{children:"ParserError"}),"s only. v5 can also surface non-fatal HTML LS tokenizer / tree-construction errors (parse5 ",(0,o.jsx)(r.code,{children:"onParseError"}),"). ",(0,o.jsx)(r.strong,{children:"Off by default."})]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-json",children:'{\n "severity": {\n "parseError": "error"\n }\n}\n'})}),"\n",(0,o.jsxs)(r.p,{children:["Or per code (",(0,o.jsx)(r.code,{children:"MLASTParseErrorCode"})," from ",(0,o.jsx)(r.code,{children:"@markuplint/ml-ast"}),"):"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-json",children:'{\n "severity": {\n "parseError": {\n "duplicate-attribute": "error",\n "nested-comment": "warning"\n }\n }\n}\n'})}),"\n",(0,o.jsxs)(r.p,{children:["Unlisted codes stay off. Existing configs that omit ",(0,o.jsx)(r.code,{children:"severity.parseError"})," keep v4 silence for non-fatal events."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.code,{children:"parserOptions.documentMode"}),": ",(0,o.jsx)(r.code,{children:"'auto'"})," (default), ",(0,o.jsx)(r.code,{children:"'document'"}),", or ",(0,o.jsx)(r.code,{children:"'fragment'"})," \u2014 overrides document-vs-fragment detection (for example SSR partials starting with ",(0,o.jsx)(r.code,{children:"<head>"}),", or a full page without a doctype when opting into ",(0,o.jsx)(r.code,{children:"missing-doctype"}),")."]})]})}function p(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453(e,r,n){n.d(r,{R:()=>i,x:()=>a});var t=n(6540);const o={},s=t.createContext(o);function i(e){const r=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(s.Provider,{value:r},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.