-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"TypeError: Cannot read properties of undefined (reading 'length')" in math blocks while using rtl plugins #40
Comments
I can't reproduce this with the ObsidianRTL plugin. Are you sure you're getting an error with that one? The DynamicRTL plugin seems to be deprecated. |
yes. I recreated it now in a new vault having only obsidian-rtl and typst-renderer. I used the following file to check if the direction matters, and got it even when the page was set to ltr (which is weird because it is the first time it behaved like this that I have seen) test for only ltr in my code.
a few lines
inline $f_x (t) = integral_0^oo e^(k/2) d t$
block :
$$f_x (t) = integral_0^oo e^(k/2) d t$$
multiline block:
$$f_x (t) = integral_0^oo e^(k/2) d t\
F'_x (t)=f_x (t)
$$ |
with your example I was able to reproduce it. e.g. this is OK. Lorem $Alpha$ ipsum.
Lorem $Beta$ ipsum. but this will get an error. Lorem $Alpha$ ipsum.
Lorem $Beta$ ipsum. Obsidian recognises it as a single obsidian-rtl separates each element inside the To be honest, I don't know anything about Right-to-Left. The content inside each inline maths have to change position? |
I can reproduce this as well, it looks like at some point the custom HTML element that renders the Typst source code gets reset or recreated. The error is from the source string being |
what do you mean by change position? if you mean change position in relation to the normal text then probably (since a line with n chars before the math block should position it either n pixels to the correct alignment). if you mean compared to itself then no, the math should be in the same direction orientation and position. |
I've been debugging for a while, and it seems to be a problem with the In the |
obsidian just added better rtl support, the obsidian rtl plugin no longer gives this error! |
I am not sure if this plugin is the cause for the problem or the rtl plugin, but since this plugin shows the error I assume this one. while using either dynamic rtl or obsidian-rtl with the math block options on.
writing math blocks seem to most of the time show the error "TypeError: Cannot read properties of undefined (reading 'length')" on some blocks, but only when in read mode. this issue persisted both on android and linux.
in edit mode:
in read mode:
after disabling the rtl plugin:
The text was updated successfully, but these errors were encountered: