@@ -48,27 +48,35 @@ module.exports.rules = {
4848 $ . _soft_line_break
4949 ) ) , ']' ) ,
5050
51- link_destination : $ => prec . dynamic ( PRECEDENCE_LEVEL_LINK , choice (
52- seq ( '<' , repeat ( choice ( $ . _text_no_angle , $ . backslash_escape , $ . entity_reference , $ . numeric_character_reference ) ) , '>' ) ,
53- seq (
54- choice ( // first character is not a '<'
55- $ . _word ,
56- punctuation_without ( $ , [ '<' , '(' , ')' ] ) ,
57- $ . backslash_escape ,
58- $ . entity_reference ,
59- $ . numeric_character_reference ,
60- $ . _link_destination_parenthesis
61- ) ,
62- repeat ( choice (
63- $ . _word ,
64- punctuation_without ( $ , [ '(' , ')' ] ) ,
51+ link_destination : $ => prec . dynamic ( PRECEDENCE_LEVEL_LINK , seq (
52+ choice ( // first character is not a '<'
53+ $ . _word ,
54+ punctuation_without ( $ , [ '<' , '(' , ')' ] ) ,
55+ $ . backslash_escape ,
56+ $ . entity_reference ,
57+ $ . numeric_character_reference ,
58+ $ . _link_destination_parenthesis
59+ ) ,
60+ repeat ( choice (
61+ $ . _word ,
62+ punctuation_without ( $ , [ '(' , ')' ] ) ,
63+ $ . backslash_escape ,
64+ $ . entity_reference ,
65+ $ . numeric_character_reference ,
66+ $ . _link_destination_parenthesis
67+ ) ) ,
68+ ) ) ,
69+ _link_destination_angle : $ => prec . dynamic ( PRECEDENCE_LEVEL_LINK ,
70+ seq ( '<' , alias ( repeat (
71+ choice (
72+ $ . _text_no_angle ,
6573 $ . backslash_escape ,
6674 $ . entity_reference ,
67- $ . numeric_character_reference ,
68- $ . _link_destination_parenthesis
75+ $ . numeric_character_reference
6976 ) ) ,
70- )
71- ) ) ,
77+ $ . link_destination
78+ ) , '>' ) ,
79+ ) ,
7280 _link_destination_parenthesis : $ => seq ( '(' , repeat ( choice (
7381 $ . _word ,
7482 punctuation_without ( $ , [ '(' , ')' ] ) ,
0 commit comments