Fix paragraph spacing#10
Merged
Merged
Conversation
This commit fixes issue #6 by removing excessive newlines that were introduced in v0.2.1. The changes restore the clean output format from v0.1.6 while maintaining all other improvements. Breaking changes addressed: - Remove leading/trailing newlines from paragraphs - Remove wrapper newlines from headers, lists, and code blocks - Maintain standard double newline (\n\n) spacing between block elements - Add String.trim() to final output for clean results Technical improvements: - Implement smart spacing to avoid spaces before punctuation - Fix BR tag handling to produce proper Markdown line breaks (two spaces + newline) - Use placeholder approach for BR tags to preserve formatting through processing The fix includes comprehensive test coverage with 15 new tests specifically for paragraph spacing scenarios including edge cases like empty paragraphs, BR tags, and mixed content types.
This release introduces significant architectural improvements to address paragraph spacing issues and enhances the overall quality of Markdown output. Changes: - Fixed paragraph spacing within containers (resolves issue #6) - Added context-aware processing with block vs inline element detection - Introduced Html2Markdown.ElementTypes module for element classification - Enhanced list formatting with proper line breaks between items - Improved code block whitespace preservation using Base64 encoding workaround - Better language detection for syntax-highlighted code blocks - Streamlined processing logic for cleaner, more readable output Breaking changes: - Paragraph spacing now uses standard double newlines (\n\n) instead of single newline + space (\n \n) for better Markdown compliance - More comprehensive content preservation (includes navigation elements)
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.
No description provided.