You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A powerful, customizable markdown renderer for Svelte with TypeScript support. Built as a successor to the original svelte-diff-match-patch package by Pablo Berganza, now maintained and enhanced by Humanspeak, Inc.
3
+
A powerful, customizable diff-match-patch component for Svelte with TypeScript support.
- 💪 Complete TypeScript support with strict typing
21
-
- 🎨 Customizable component rendering system
22
-
- 🔒 Secure HTML parsing via HTMLParser2
23
-
- 🎯 GitHub-style slug generation for headers
24
-
- ♿ WCAG 2.1 accessibility compliance
21
+
- 🎨 Customizable diff rendering with CSS classes OR svelte snippets
22
+
- 🔒 Safe and efficient text comparison
23
+
- 🎯 Configurable cleanup algorithms (semantic and efficiency)
25
24
- 🧪 Comprehensive test coverage (vitest and playwright)
26
25
- 🔄 Svelte 5 runes compatibility
27
-
-🛡️ XSS protection and sanitization
28
-
-🎨 Custom Marked extensions support (e.g., GitHub-style alerts)
29
-
-🔍 Improved attribute handling and component isolation
30
-
-📦 Enhanced token cleanup and nested content support
26
+
-⚡ Configurable timeout for large text comparisons
27
+
-📊 Detailed timing and diff statistics
28
+
-🎨 Customizable diff highlighting styles
29
+
-🔍 Real-time diff updates
31
30
32
31
## Recent Updates
33
32
34
33
### New Features
35
34
36
-
- Improved HTML attribute isolation for nested components
37
-
- Enhanced token cleanup for better nested content handling
38
-
- Added proper attribute inheritance control
39
-
- Implemented strict debugging checks in CI/CD pipeline
35
+
- Added detailed timing information for diff operations
36
+
- Enhanced cleanup algorithms for better diff results
37
+
- Improved performance for large text comparisons
38
+
- Added TypeScript types for all component props and events
39
+
- Implemented proper state management with Svelte 5 runes
40
40
41
41
### Testing Improvements
42
42
43
43
- Enhanced Playwright E2E test coverage
44
-
- Added comprehensive tests for custom extensions
44
+
- Added comprehensive tests for cleanup algorithms
45
45
- Improved test reliability with proper component mounting checks
46
-
- Added specific test cases for nested component scenarios
47
-
-**Note:** Performance tests use a higher threshold for Firefox due to slower execution in CI environments. See `tests/performance.test.ts` for details.
48
-
49
-
### CI/CD Enhancements
50
-
51
-
- Added automated debugging statement detection
52
-
- Improved release workflow with GPG signing
53
-
- Enhanced PR validation and automated version bumping
54
-
- Added manual workflow triggers for better release control
const { href = '', title = '', children }: Props = $props()
143
147
</script>
144
148
145
-
<a {href} {title} class="custom-link">
146
-
{@render children?.()}
147
-
</a>
148
-
```
149
-
150
-
If you would like to extend other renderers please take a look inside the [renderers folder](https://github.com/humanspeak/svelte-diff-match-patch/tree/main/src/lib/renderers) for the default implentation of them. If you would like feature additions please feel free to open an issue!
151
-
152
-
## Advanced Features
153
-
154
-
### Table Support with Mixed Content
155
-
156
-
The package excels at handling complex nested structures and mixed content:
0 commit comments