Closed zecakeh closed 3 months ago
https://spec.matrix.org/unstable/rooms/v11/ (and others) appear to be working fine right now. Is there a place where we can see the bug?
It doesn't work fine, there are entries missing in the toc.
Example for v11:
Before this PR:
After this PR (notice the new entries under "State Resolution"):
oh my. That's dangerous.
Ideally we'd have CI for this, but that's not a problem for this PR to solve.
We need to use
.RenderShortcodes
for room version pages like in #1851, otherwise the headings in the included fragments are not present in the ToC of the page.However, that breaks the
withVersioning
trick, because the output we get has shortcodes replaced by temporary opaque strings, so we cannot detect them to remove them. The solution I found is to use a page parameter in theadded-in
andchanged-in
shortcodes to detect if the current version is the same as thev
parameter, since it seems to be the only way to pass a variable from the rendered page to the shortcode in the fragment.Pull Request Checklist
Preview: https://pr1884--matrix-spec-previews.netlify.app