mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 15:57:49 +00:00
With `unicode-bidi: plaintext`, SVG import looked for the first strong character of an element in each text node on its own and kept the first answer. An isolate that opened in one text node and closed in a later one hid the rest of that node, and the node then answered left to right. For `⁧ab<tspan>⁩א</tspan>` the element ran left to right, where UAX #9 P2 skips the isolate and finds the right-to-left letter after it (https://www.unicode.org/reports/tr9/#P2). The characters of the whole `<text>` are now read once, in order, and each isolate initiator is matched with its PDI (UAX #9 BD9). Each element's first strong character is then found in constant time, so nested `plaintext` elements do not read the same characters again. An isolate that opens inside an element and closes after it hides the rest of that element. vectorcraft-svg takes `unicode-bidi` 0.3.18, which vectorcraft-text already uses, for the bidi classes.