You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Details
Similar to the problem around anti-conceal ignore modes. Individual
component render modes are checked once at creation time and used until
a recompute is necessary. This can potentially include various mode
changes, and since the results are not updated the rendering will be
incorrect.
To fix this add an optional `modes` field to the `render.md.Mark` class.
This gets populated based on the `render_modes` value for the relevant
component and stored as part of the mark metadata. We then use this
information to check for each `mark` if it should be rendered based on
either being in the top level mode or the mark level mode. Custom
handlers can use this feature as well, though with some edge cases like
potentially not identifying the specified mode as a render mode.
This does have a performance drawback compared to the old approach.
Before we would avoid creating / processing nodes if they didn't match any
of the mode values. Now if any mode value is matched in any component we
will compute the marks for all components, even if they're not needed
right now. That way if a mode change happens without a text change we'll
have all the marks we might potentially need to show, and show the ones
relevant to the current mode.
For most users who do not use this feature this should essentially have
no impact on performance.
0 commit comments