uniorg-parse
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -975,3 +975,3 @@ import { VFile } from 'vfile'; | ||
if (m) { | ||
const indent = m.groups.indent.length; | ||
const indent = (m.groups.indent1?.length || 0) + (m.groups.indent2?.length || 0); | ||
// end previous siblings | ||
@@ -978,0 +978,0 @@ while (items.length && items[items.length - 1].indent >= indent) { |
@@ -51,4 +51,5 @@ export class OrgRegexUtils { | ||
} | ||
// see (org-item-re) | ||
listItemRe() { | ||
return new RegExp(`^(?<indent> *)(\\*|-|\\+|\\d+\\.|\\d+\\)|\\w\\.|\\w\\))( |\\n)`); | ||
return new RegExp(`^((?<indent1>[ \\t]+)\\*|(?<indent2>[ \\t]*)(-|\\+|\\d+\\.|\\d+\\)|\\w\\.|\\w\\)))([ \\t]|\\n)`); | ||
} | ||
@@ -61,2 +62,3 @@ /// Matches a list item and puts everything into groups: | ||
/// - tag (description tag) | ||
// see org-list-full-item-re | ||
fullListItemRe() { | ||
@@ -63,0 +65,0 @@ return /^(?<indent>[ \t]*)(?<bullet>(?:[-+*]|(?:[0-9]+|[A-Za-z])[.)])(?:[ \t]+|$))(?<counter_group>\[@(?:start:)?(?<counter>[0-9]+|[A-Za-z])\][ \t]*)?(?<checkbox_group>(?<checkbox>\[[ X-]\])(?:[ \t]+|$))?(?:(?<tag>.*?)[ \t]+::(?:[ \t]+|$))?/im; |
{ | ||
"name": "uniorg-parse", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"type": "module", | ||
@@ -54,3 +54,3 @@ "description": "uniorg plugin to parse org-mode", | ||
}, | ||
"gitHead": "e77afd8255895985eaa8b0cf15de8edab81a89b6" | ||
"gitHead": "47b506d61fe3190dac76d16db283b1af62f35f0d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
259829
3117