Skip to content
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

[BUG] Proposed Fix To Errors When Using Codeblock Math Mode #316

Open
WhoAmI-WhereAmI opened this issue Jul 21, 2024 · 0 comments
Open

[BUG] Proposed Fix To Errors When Using Codeblock Math Mode #316

WhoAmI-WhereAmI opened this issue Jul 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@WhoAmI-WhereAmI
Copy link

Description

currently, when using codeblocks, latex suite constantly warns:
plugin:obsidian-latex-suite:13223 unable to locate start of the codeblock even though inside one

also, when putting math as codeblock language, it now errs:
TypeError: Cannot read properties of null (reading 'from') at getCodeblockBounds (plugin:obsidian-latex-suite:13211:52) at _Context.getInnerBounds (plugin:obsidian-latex-suite:13133:16) at _Context.isWithinEnvironment (plugin:obsidian-latex-suite:13082:25) at _Context.inTextEnvironment (plugin:obsidian-latex-suite:13114:17) at _Context.fromState (plugin:obsidian-latex-suite:13071:30) at _Context.fromView (plugin:obsidian-latex-suite:13077:21) at handleKeydown (plugin:obsidian-latex-suite:15237:23) at Object.onKeydown (plugin:obsidian-latex-suite:15231:19) at app.js:1:375614 at e.runHandlers (app.js:1:373670)

To Reproduce

also happens in sandbox vault with only latex suite downloaded.

Expected Behavior

should be able to locate codeblock properly

Additional Info

in main.js file of latex suite plugin, function escalateToToken is the cause of error.
the fix is to search for HyperMD-codeblock_HyperMD-codeblock-bg instead of HyperMD-codeblock_HyperMD-codeblock-begin
at line 13212 and 13225.
supposedly obsidian itself has changed the name at some point...?
however, doing this somehow hinders the friendly popup equation and it won't work now.
if sbd with any idea what's going on can leave a comment that'd be awesome

@WhoAmI-WhereAmI WhoAmI-WhereAmI added the bug Something isn't working label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant