Skip to content

Enhance STMarkdown functionality with CocoaPods integration and tests#7

Merged
i-stack merged 27 commits into
mainfrom
1.3.0_dev
May 25, 2026
Merged

Enhance STMarkdown functionality with CocoaPods integration and tests#7
i-stack merged 27 commits into
mainfrom
1.3.0_dev

Conversation

@i-stack
Copy link
Copy Markdown
Owner

@i-stack i-stack commented May 25, 2026

No description provided.

i-stack added 27 commits May 11, 2026 16:22
- Added Example/Pods/ to .gitignore to prevent local CocoaPods files from being tracked.
- Updated README to include instructions for setting up the local demo with CocoaPods, enhancing clarity for new users.
…ions

- Added tests for `STMarkdownMalformedTableNormalizer` to ensure proper handling of malformed tables.
- Introduced `autoFixMalformedTables` configuration option in `STMarkdownPipelineConfiguration` to enable automatic correction of common table issues.
- Updated `STMarkdownStyle` to include `linkUnderlineEnabled` and padding options for lists, improving styling flexibility.
- Implemented smart streaming capabilities in `STMarkdownStreamingTextView` for more efficient Markdown rendering during live updates.
- Expanded the documentation in `STMarkdown-MarkdownDisplayView-Comparison.md` to detail the implementation of incremental AST, `replaceCount`, and parser-level locks.
- Added recommendations for TOC and footnote implementations to align with vendor capabilities.
- Updated tests in `STMarkdownStreamBufferTests.swift` to clarify behavior during multi-append scenarios, ensuring stability in committed content.
- Updated `STMarkdownRenderBlock` to include `anchorId` for headings, facilitating table of contents generation.
- Modified `STMarkdownPipeline` to extract TOC items from the rendered document.
- Enhanced `STMarkdownBaseTextView` to manage and scroll to heading anchors, improving navigation within rendered content.
- Added tests to verify TOC functionality and ensure correct heading anchor behavior across various scenarios.
- Introduced `processIncremental` method in `STMarkdownPipeline` to handle incremental parsing of Markdown, providing a more efficient way to process changes.
- Updated `STMarkdownEngine` to expose the new incremental processing functionality.
- Enhanced `STMarkdownStreamBuffer` documentation to clarify its role in conjunction with incremental parsing.
- Added tests for `STMarkdownIncrementalParseResult` to ensure accurate behavior during incremental updates.
- Introduced footnote handling in `STMarkdownDocument` and `STMarkdownRenderAdapter`, allowing for the inclusion of footnotes in rendered documents.
- Added support for rendering raw HTML blocks with configurable policies in `STMarkdownStyle`, enhancing flexibility in document rendering.
- Updated parsing logic to accommodate new inline and block node types for footnotes and raw HTML.
- Enhanced `STMarkdownAttributedStringRenderer` to properly render footnotes and raw HTML according to the specified policies.
…ts updates

- Added a new test case in `STMarkdownIncrementalParseTests` to verify that incremental strict prefix growth matches the full processing results.
- Introduced `updateTableOfContents` method in `STMarkdownBaseTextView` to refresh the table of contents from the rendered document, supporting incremental processing.
- Updated `STMarkdownStreamingTextView` to utilize a new `renderWithDocument` method for improved rendering and TOC management during streaming updates.
- Added support for footnote deep linking in `STMarkdownAttributedStringRenderer`, allowing footnotes to be rendered as clickable links.
- Introduced `onFootnoteTap` callback in `STMarkdownBaseTextView` and related UI components to handle footnote interactions.
- Updated `STScrollableMarkdownView` to include a table of contents (TOC) panel with user interaction capabilities, aligning with vendor API semantics.
- Enhanced `STMarkdownBaseTextView` to notify changes in the TOC during rendering, ensuring synchronization with the displayed content.
- Removed the `STMarkdownAttachmentUnitTests` test target from the Package.swift file.
- Updated the `STMarkdown-MarkdownDisplayView-Comparison.md` to reflect changes in block-level capabilities, including support for `details` and `rawHTML`.
- Improved unit tests for `STMarkdownRefreshableAttachment` and `STMarkdownStructureParser` to ensure proper functionality and metadata handling.
- Enhanced `STMarkdownRenderAdapter` documentation to clarify the requirement for structured metadata paths.
- Introduced `SmartStreamingRenderMode` enum to manage rendering modes (full and incremental).
- Implemented methods for incremental rendering and canonical markdown processing.
- Added unit tests to verify smart streaming behavior, including handling of duplicate headings and sanitization.
- Enhanced rendering logic to support efficient updates during streaming sessions.
…eout features

- Introduced `PendingAnimatedSuffix` struct to manage suffix animations during streaming.
- Added `streamingAnimationWatchdogTimeout` property to enforce a timeout for streaming animations.
- Implemented methods to handle pending animated suffixes and invalidate animations when necessary.
- Enhanced `STShimmerTextView` with animation state change callbacks to improve synchronization with streaming animations.
- Added `onExpandTable` callback to `STMarkdownTableView` and related components to support table expansion interactions.
- Implemented gesture handling for expanding tables when selecting cells without citations.
- Updated unit tests to verify the correct behavior of table expansion and citation interactions.
- Enhanced gradient visibility management for scrollable tables to improve user experience.
- Introduced `HighlightJS` typealias for generating syntax-highlighted `NSAttributedString` using highlight.js.
- Supports 20 programming languages with caching for efficient rendering.
- Recommended for scenarios requiring syntax highlighting without attachment images, with a suggestion to trigger from a background thread.
…implifying citation extraction logic

- Updated comments in `STMarkdownFootnoteDeepLink.swift` to reflect creation date.
- Removed unnecessary comment in `STMarkdownFootnoteSupport.swift`.
- Simplified citation number extraction in `STMarkdownTableViewModel.swift` by utilizing `STMarkdownCitationReferenceSupport`.
- Cleaned up comments in `STMarkdownMalformedTableNormalizer.swift` for clarity.
…ccess

- Changed `STMarkdownRegexFactory` and `STMarkdownRegex` enums from internal to public to allow external usage.
- Updated method signatures in `STMarkdownRegexFactory` and properties in `STMarkdownRegex` to be public, enhancing the API for regex compilation and matching.
- Simplified method signatures across multiple files by removing unnecessary line breaks and comments.
- Enhanced the initialization of `STMarkdownEngine` and `STMarkdownRenderAdapter` for better clarity.
- Updated regex patterns in `STMarkdownRegexPatterns` for improved organization and accessibility.
- Cleaned up comments in various files to maintain focus on relevant code functionality.
- Simplified method signatures by removing unnecessary line breaks and comments across multiple files.
- Cleaned up comments to enhance focus on code functionality.
- Updated initialization and rendering methods for better clarity and organization.
- Updated logic to handle cases where the block ID attribute is missing, allowing for custom renderers without STMarkdown metadata.
- Improved clarity by separating the raw block ID retrieval and validation steps, ensuring more robust handling of attributed text.
…STMarkdown

- Introduced a new rule to convert bare bracket labels (e.g., `[偏头痛]`, `[咖啡因]`) into plain text, while excluding certain conditions such as valid Markdown links and citation formats.
- Updated `STMarkdownInputSanitizer` to include the new rule in the processing pipeline.
- Enhanced `STMarkdownBlockLayoutCalculator` with methods for handling standalone colon heading paragraphs and their spacing.
- Cleaned up comments and added creation dates in several rendering files for better documentation.
- Updated logic to consider both unordered and ordered lists when determining nested indentation and stripping conditions.
- Improved clarity by renaming variables for better understanding of their purpose in the context of list processing.
- Updated `STMarkdownRenderAdapter` to include `unorderedDepth` in block rendering for improved list handling.
- Introduced `rowGroups` in `STMarkdownTableViewModel` to facilitate visual grouping of table rows based on empty first columns.
- Added a new normalizer, `STMarkdownHeadingStandaloneStrongNormalizer`, to simplify headings containing only a single strong node.
- Refined list item rendering to utilize `unorderedDepth` for bullet symbol selection in `STMarkdownAttributedStringRenderer`.
- Improved handling of trailing emphasis and backticks in `STMarkdownStreamingPresenter` and `STMarkdownStreamingTransforms` to prevent unclosed markers during streaming.
@i-stack i-stack merged commit 4ed89ac into main May 25, 2026
0 of 2 checks passed
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.

1 participant