Skip to content

Conversation

cscheid
Copy link
Collaborator

@cscheid cscheid commented Feb 19, 2024

This changes the way Markdown is resolved and stored throughout Quarto.

Now that a presence of a ProjectContext file is guaranteed, we can give ProjectContext the responsibility to resolve the "full markdown" of a document. The "full markdown" of a document is the result of expanding all include shortcodes.

Previously, our engine determination was in a bit a mess where we had complicated logic to determine what the engine was supposed to be. In addition, because we had no single source of truth for that, we had different logic in different code paths, and we could not take advantage of caching.

This PR makes it so that include shortcodes are resolved before engine determination. For each markdown file, engine determination is then only performed once (and cached at the ProjectContext object). This simplifies the logic, increases performance, cleans up the code and fixes bugs.

This closes #8779 and part of #8563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

include shortcodes must be resolved earlier than they are

1 participant