-
-
Notifications
You must be signed in to change notification settings - Fork 34
2025 fixes #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
2025 fixes #81
Conversation
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
…ipts to use latest node
Fixed transformer.js to correctly remove performance functions regardless of CI environment variable. The previous logic was: if (process.env.CI || !cfg.removePerf) return node; which would skip removal when CI=true. Now correctly checks only: if (!cfg.removePerf) return node; Also ensured ts-patch is properly installed so the transformer actually runs during compilation. Resolves #58
HTML is case-insensitive by spec, but the library was failing to process tags with mixed case (e.g., <Br>, <DIV>, <Strong>). This caused translation to stop prematurely, resulting in data loss. Root cause: The HTML parser with lowerCaseTagName: false would preserve the original case, but wouldn't recognize mixed-case void elements like <Br> as self-closing tags. This caused content after the tag to be incorrectly parsed as children of that tag. Solution: 1. Set lowerCaseTagName: true in nodeHtmlParserConfig to normalize all tags 2. Updated visitor.ts to handle tags case-insensitively using toUpperCase() 3. Added comprehensive tests for various mixed-case tag scenarios All translator lookups and element matching now work regardless of the original HTML tag casing, preventing data loss when processing HTML with inconsistent capitalization. Resolves #63
Addresses #69 and #66 by documenting expected behavior: - Explains paragraph spacing is standard markdown (blank lines between paragraphs) - Documents line breaks vs paragraphs behavior - Provides clear examples of maxConsecutiveNewlines option usage - Shows how to control consecutive newlines for different use cases Both issues are by-design behavior, not bugs. The maxConsecutiveNewlines option (default: 3) already provides the control users need.
…fixes #34) - Modified text node processing in visitor.ts to preserve trailing whitespace when followed by inline formatting elements - Newlines before <b>, <strong>, <em>, <i>, <code>, <del> etc. are now correctly converted to spaces instead of being removed - Only trim leading spaces if they were originally newlines - Preserve trailing spaces in text nodes for proper inline spacing
…not be inside codeblocks
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.
No description provided.