Skip to content

Commit

Permalink
Comment why RstParserOutput is necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Jul 3, 2024
1 parent c60781a commit f17b72d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/RstCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ export class RstCompiler {
}

createParserOutput(root: RstDocument) {
// Need to create a bundle around root (with resolves) after parse() instead of before generate()
// because plugins' onParse hook need access to resolvers

const htmlAttrResolver = new HtmlAttrResolver()
const substitutionResolver = new SubstitutionResolver(root.findAllChildren(RstNodeType.SubstitutionDef))
const simpleNameResolver = new SimpleNameResolver(this, htmlAttrResolver, root)
Expand Down

0 comments on commit f17b72d

Please sign in to comment.