Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/engine/extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@ ExtractionResult extract_with_config(
// node positions, and node_text all read the rewritten buffer transparently.
std::string rewritten;
ExtractionContext local = context;
// The memo holds nodes of the tree parsed below, so it lives and dies with
// this parse, even when a caller reuses one context for several.
local.memo = make_extraction_memo();
if (config.preprocess_source) {
rewritten = config.preprocess_source(context.source);
if (!rewritten.empty()) {
Expand Down
Loading
Loading