@@ -89,9 +89,9 @@ export function fromHtml(value, options) {
8989 const settings = options || emptyOptions
9090 const onerror = settings . onerror
9191 const file = value instanceof VFile ? value : new VFile ( value )
92- const fn = settings . fragment ? parseFragment : parse
93- const doc = String ( file )
94- const p5doc = fn ( doc , {
92+ const parseFunction = settings . fragment ? parseFragment : parse
93+ const document = String ( file )
94+ const p5Document = parseFunction ( document , {
9595 sourceCodeLocationInfo : true ,
9696 // Note `parse5` types currently do not allow `undefined`.
9797 onParseError : settings . onerror ? internalOnerror : null ,
@@ -100,7 +100,7 @@ export function fromHtml(value, options) {
100100
101101 // `parse5` returns document which are always mapped to roots.
102102 return /** @type {Root } */ (
103- fromParse5 ( p5doc , {
103+ fromParse5 ( p5Document , {
104104 file,
105105 space : settings . space ,
106106 verbose : settings . verbose
@@ -182,7 +182,7 @@ export function fromHtml(value, options) {
182182 function formatC ( _ , $1 , $2 ) {
183183 const offset =
184184 ( $2 ? Number . parseInt ( $2 , 10 ) : 0 ) * ( $1 === '-' ? - 1 : 1 )
185- const char = doc . charAt ( error . startOffset + offset )
185+ const char = document . charAt ( error . startOffset + offset )
186186 return visualizeCharacter ( char )
187187 }
188188
@@ -193,7 +193,7 @@ export function fromHtml(value, options) {
193193 * Formatted.
194194 */
195195 function formatX ( ) {
196- return visualizeCharacterCode ( doc . charCodeAt ( error . startOffset ) )
196+ return visualizeCharacterCode ( document . charCodeAt ( error . startOffset ) )
197197 }
198198 }
199199 }
0 commit comments