rasendubi / uniorg

An accurate Org-mode parser for JavaScript/TypeScript

Home Page:https://oleksii.shmalko.com/uniorg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error parsing element `\_<SPC>`

rogueai opened this issue · comments

Hi, I ended up here while investigating an issue I'm having with org-roam-ui.

I first encountered the issue with files containing org clock tables which usually produce a block like this:

#+BEGIN: clocktable :scope file :maxlevel 2
#+CAPTION: Clock summary at [2022-07-22 Fri 18:00]
| Headline                                     | Time   |      |
|----------------------------------------------+--------+------|
| *Total time*                                 | *1:00* |      |
|----------------------------------------------+--------+------|
| Friday, 07/22/2022                           | 1:00   |      |
| \_  First task                               |        | 0:30 |
| \_  Second task                              |        | 0:30 |
#+END:

I tried to pinpoint the exact issue, and eventually ended up with this snippet as a minimum requirement to reproduce:

\_ a

Feeding this snippet to the example in uniorg parser repo gives:

file:///[...]/node_modules/uniorg-parse/lib/parser.js:1169
            this.r.backoff(m.groups.brackets.length);
                                             ^

TypeError: Cannot read properties of undefined (reading 'length')

Thanks, and apologies if this was a known issue!

Thanks for the bug report! fixed the bug in #58 and published as v0.5.6.

Thanks for the new year's fix :)

Just tested and it works fine, I'm going to report this to the org-roam-ui guys