Commit Graph

34 Commits

Author SHA1 Message Date
Shadowfacts 95edb408fa Fix replace callback with nested element, fix skip/replace at beginning of block skipping block break
Fixes shadowfacts/Tusker#461
2024-03-17 10:56:49 -04:00
Shadowfacts 9c8b127f15 Use something more like white-space: pre-wrap; 2024-02-28 17:59:06 -05:00
Shadowfacts a2ca8fd650 BlockStateMachine performance improvements 2024-02-22 15:19:53 -05:00
Shadowfacts 1f26c4923c The great encomplicating 2024-02-21 11:15:27 -05:00
Shadowfacts fa03efedbb Actually fix block element rendering 2024-02-14 21:07:19 -05:00
Shadowfacts 1bfacb8fe9 Fix crash when converting malformed HTML with unmatched closing tag 2024-02-06 18:53:47 -05:00
Shadowfacts aed61d84d3 Fix stack overflow when whitespace appears after attribute name and before tag-closing > 2024-02-06 18:46:56 -05:00
Shadowfacts 7e624c0a4a Fix .skip action skipping too much if a run was in-progress when the skip element was encountered 2024-02-04 15:09:08 -05:00
Shadowfacts a86fe04348 Support building for visionOS 2024-01-26 11:10:24 -05:00
Shadowfacts aa8f99bb96 Handle block elements better (again) 2024-01-17 15:28:06 -05:00
Shadowfacts e709543568 Fix extra line breaks being inserted before lists 2024-01-16 19:31:05 -05:00
Shadowfacts a32b972201 Add append action to element callbacks 2024-01-16 19:15:56 -05:00
Shadowfacts 64b68a6cec Fix converter state not being reset 2023-12-26 14:40:02 -05:00
Shadowfacts b33be0f178 Actually fix how whitespace is inserted between block elements 2023-12-26 14:29:40 -05:00
Shadowfacts 1ee7ab9405 Avoid dictionary lookups when setting paragraph style 2023-12-26 12:02:38 -05:00
Shadowfacts 5a7b5860dd Fix color not being applied 2023-12-24 11:52:36 -05:00
Shadowfacts 38b1d2949b Return temporary buffer as a .characterSequence 2023-12-23 11:49:43 -05:00
Shadowfacts f585a6b502 Fix TextConverterConfiguration property name 2023-12-23 10:45:11 -05:00
Shadowfacts 5bdfda71e6 HTML to plain text conversion 2023-12-22 20:36:55 -05:00
Shadowfacts 601c9f2cd8 Fix converting self-closing br tags 2023-12-22 18:58:27 -05:00
Shadowfacts 395f5965bc Fix inline text/elements coming after block elements 2023-12-17 18:54:26 -05:00
Shadowfacts c8512fa71e FIx tests not building on iOS 2023-12-17 18:35:07 -05:00
Shadowfacts d396a800f6 Fix handling of mis-nested <a> tags 2023-12-17 18:32:00 -05:00
Shadowfacts 2f18ad3cf4 Process runs of unmodified characters as characterSequence tokens 2023-11-28 20:58:01 -05:00
Shadowfacts f7f35e09f7 Use Unicode.Scalar instead of Character
All the chars we care about are a single scalar, so this avoids spending
time on the grapheme breaking algorithm.
2023-11-28 11:56:56 -05:00
Shadowfacts f412369cf7 Don't use enum with associated values for current token
They prevent in-place modification, resulting in a bunch of extra copies
2023-11-28 10:36:04 -05:00
Shadowfacts 31bd174a69 Use loops instead of recursion in hot path
Small but measurable perf win
2023-11-27 00:04:10 -05:00
Shadowfacts 29a065049e Ditch InlineArray3
Turns out Array is still faster
2023-11-26 22:35:10 -05:00
Shadowfacts 1c461041c1 Cache fonts in attributed string converter 2023-11-26 18:53:59 -05:00
Shadowfacts 134803b72d Faster tokenizing for named character references 2023-11-26 18:26:22 -05:00
Shadowfacts e22f778f8f Make things public 2023-11-25 22:58:00 -05:00
Shadowfacts 97ce18d056 Convert lists to attributed strings 2023-11-25 09:44:53 -05:00
Shadowfacts 38d57b3f79 Attributed string conversion 2023-11-24 22:17:37 -05:00
Shadowfacts a4d791a995 Add tokenizer 2023-11-24 15:18:37 -05:00