rasendubi / uniorg

An accurate Org-mode parser for JavaScript/TypeScript
https://oleksii.shmalko.com/uniorg
GNU General Public License v3.0
263 stars 25 forks source link

fix: handle single asterisk on a line #35

Closed rasendubi closed 2 years ago

rasendubi commented 2 years ago

The issue is caused by list item regex capturing -items on start of the line. Fixed this by requiring at least one space before in list (well, just copying org-item-re from org-element.el)

fixes #34

codecov-commenter commented 2 years ago

Codecov Report

Merging #35 (c92e82d) into master (e77afd8) will increase coverage by 0.18%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
+ Coverage   95.70%   95.89%   +0.18%     
==========================================
  Files          15       15              
  Lines        1606     1606              
  Branches      515      516       +1     
==========================================
+ Hits         1537     1540       +3     
+ Misses         68       65       -3     
  Partials        1        1              
Impacted Files Coverage Δ
packages/uniorg-parse/src/utils.ts 100.00% <ø> (ø)
packages/uniorg-parse/src/parser.ts 95.16% <100.00%> (+0.30%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more