feat: add GFM streaming support for tables and block math#270
Merged
hryhoriiK97 merged 12 commits intomainfrom Apr 28, 2026
Merged
feat: add GFM streaming support for tables and block math#270hryhoriiK97 merged 12 commits intomainfrom
hryhoriiK97 merged 12 commits intomainfrom
Conversation
…t for improved performance
…eContent behavior
…o StreamingMarkdownFilter.m
…ponents into reusable functions
…ng state management
…ning signatures for reuse
4 tasks
…clude for GFM table handling
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.
What/Why?
Fixes: #241
Adds iOS support for smoother
streamingAnimationwith GitHub-flavored markdown tables and block LaTeX.Previously, GFM block views could be recreated repeatedly while markdown was streaming, causing visible jank and extra UI thread work. This PR splits parsed GFM content into native-renderable segments: text, table, and block math. Each segment gets a deterministic content signature, so iOS can reconcile new renders against existing native views instead of rebuilding completed blocks.
During reconciliation:
When
streamingAnimationis active, incomplete trailing tables and block math are hidden until their markdown is complete. This avoids repeatedly rendering expensive partially parsed block views while text continues to stream normally.The PR also adjusts iOS measurement/layout for streaming GFM so height updates track rendered content more reliably, including newly completed block segments, and keeps table interactions working when layout catches up.
Static GFM behavior remains unchanged.
Testing
Screenshots
Nagranie.z.ekranu.2026-04-25.o.16.01.37.mov
Screen.Recording.2026-04-28.at.13.06.34.mov
PR Checklist