Fix stars range parsing
This commit is contained in:
parent
44d6a09dc3
commit
feefaeec27
4 changed files with 41923 additions and 41867 deletions
|
|
@ -17,7 +17,7 @@ org_grammar = {
|
|||
$._listend,
|
||||
$._listitemend,
|
||||
$._bullet,
|
||||
$.stars,
|
||||
$._stars,
|
||||
$._sectionend,
|
||||
$._markup,
|
||||
$._eof, // Basically just '\0', but allows multiple to be matched
|
||||
|
|
@ -130,7 +130,7 @@ org_grammar = {
|
|||
// Headlines =========================================== {{{1
|
||||
|
||||
headline: $ => seq(
|
||||
$.stars,
|
||||
$._stars, alias(/\*+/, $.stars),
|
||||
optional(seq(
|
||||
/[ \t]+/, // so it's not part of title
|
||||
$.item,
|
||||
|
|
|
|||
|
|
@ -428,7 +428,16 @@
|
|||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "stars"
|
||||
"name": "_stars"
|
||||
},
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "PATTERN",
|
||||
"value": "\\*+"
|
||||
},
|
||||
"named": true,
|
||||
"value": "stars"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
|
|
@ -3021,7 +3030,7 @@
|
|||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "stars"
|
||||
"name": "_stars"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
|
|
|
|||
83772
src/parser.c
83772
src/parser.c
File diff suppressed because it is too large
Load diff
|
|
@ -233,7 +233,6 @@ bool scan(TSLexer *lexer, const bool *valid_symbols) { // {{{1
|
|||
return true;
|
||||
} else if (valid_symbols[HLSTARS] && iswspace(lexer->lookahead)) {
|
||||
section_stack.push_back(stars);
|
||||
lexer->mark_end(lexer);
|
||||
lexer->result_symbol = HLSTARS;
|
||||
return true;
|
||||
} else if (valid_symbols[MARKUP] && stars == 1 && (!iswspace(lexer->lookahead) && lexer->lookahead != '\0')) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue