Add sticky headings and optimize preprocessor performance#17
Merged
samuelduchesne merged 3 commits intoFeb 27, 2026
Merged
Conversation
… bottleneck Visual: inject <hr class="idf-object-separator"> between IDF objects on IO Reference group pages so long pages have clear visual breaks. The heading immediately after each separator becomes position:sticky, staying visible while scrolling through that object's fields. Performance: rewrite _expand_all_bracket_macros() to use regex search instead of character-by-character scanning. The old code created a substring slice on every iteration (`text[i:].startswith(…)`), making it O(n²) for large LaTeX files. The new version jumps directly to the next macro via re.search(), reducing single-version conversion from ~632 s to ~86 s (7.3× faster). Also adds pyinstrument as a dev dependency for future profiling. https://claude.ai/code/session_01BFFEpg2Hxz1hHr8JDZ1P6Y
Ignore downloaded binary packages (e.g. pandoc .deb from pypandoc). https://claude.ai/code/session_01BFFEpg2Hxz1hHr8JDZ1P6Y
51a04f3
into
feature/charming-matsumoto
3 of 4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to the documentation site's object navigation and performance optimizations in the LaTeX preprocessor. The most significant changes are the addition of visual separators and sticky headings for IDF objects in the rendered documentation, and a more efficient approach to expanding bracket macros in the LaTeX preprocessor.
Documentation UI/UX improvements:
<hr class="idf-object-separator">separator between consecutive IDF objects in the generated markdown to visually segment long group pages. [1] [2]idf-fields.cssto style the object separators and make object headings (h2/h3after a separator) sticky while scrolling, improving navigation within long documentation pages.Performance and code improvements:
_expand_all_bracket_macrosfunction inlatex_preprocessor.pyto use regular expressions for locating macros, significantly improving performance on large files and ensuring correct handling of nested macros.Development tooling:
pyinstrumentas a development dependency for profiling Python code.