|
|
|
|
|
by amluto
1026 days ago
|
|
Sadly, both the website and the linked codepen render the source quite poorly. The period is in the wrong place! The rendered HTML is fine. I assume this is just the Unicode bidirectional algorithm failing, as it is wont to do. I imagine that a special cased algorithm that understood that HTML tags (the stuff between < and > inclusive) should render as atomic things, internally LTR, but without imposing their direction on surrounding characters. In this example, the algorithm should be willing to switch direction in the middle of the sequence “.<“ |
|
If you want to force mixed-direction content to render correctly, you often need to insert bidirectional control characters to specify where a certain directional run begins/ends. That doesn't make sense to add in this case, though, because it would mess up the rendering in the actual input example.