diff --git a/tree-sitter-markdown-inline/grammar.js b/tree-sitter-markdown-inline/grammar.js index 0abf70f..ae1ef8b 100644 --- a/tree-sitter-markdown-inline/grammar.js +++ b/tree-sitter-markdown-inline/grammar.js @@ -109,11 +109,6 @@ module.exports = grammar(add_inline_rules({ [$.shortcut_link, $._link_text], [$.link_destination, $.link_title], [$._link_destination_parenthesis, $.link_title], - - [$.wiki_link, $._inline_element], - [$.wiki_link, $._inline_element_no_star], - [$.wiki_link, $._inline_element_no_underscore], - [$.wiki_link, $._inline_element_no_tilde], ], extras: $ => [], @@ -449,7 +444,7 @@ function add_inline_rules(grammar) { conflicts.push(['_emphasis_star' + suffix_link, '_inline_element' + suffix_delimiter + suffix_link]); conflicts.push(['_emphasis_star' + suffix_link, '_strong_emphasis_star' + suffix_link, '_inline_element' + suffix_delimiter + suffix_link]); } - if (delimiter == 'star' || delimiter == 'underscore') { + if ((delimiter == 'star' || delimiter == 'underscore') && suffix_link != '_no_link') { conflicts.push(['_strong_emphasis_' + delimiter + suffix_link, '_inline_element_no_' + delimiter]); } if (delimiter !== "underscore") { diff --git a/tree-sitter-markdown-inline/src/grammar.json b/tree-sitter-markdown-inline/src/grammar.json index 3f299cf..f1489b7 100644 --- a/tree-sitter-markdown-inline/src/grammar.json +++ b/tree-sitter-markdown-inline/src/grammar.json @@ -5989,22 +5989,6 @@ "_link_destination_parenthesis", "link_title" ], - [ - "wiki_link", - "_inline_element" - ], - [ - "wiki_link", - "_inline_element_no_star" - ], - [ - "wiki_link", - "_inline_element_no_underscore" - ], - [ - "wiki_link", - "_inline_element_no_tilde" - ], [ "_emphasis_star", "_inline_element" @@ -6101,10 +6085,6 @@ "_strikethrough_no_link", "_inline_element_no_link" ], - [ - "_strong_emphasis_star_no_link", - "_inline_element_no_star" - ], [ "_emphasis_underscore_no_link", "_inline_element_no_star_no_link" @@ -6127,10 +6107,6 @@ "_strong_emphasis_star_no_link", "_inline_element_no_underscore_no_link" ], - [ - "_strong_emphasis_underscore_no_link", - "_inline_element_no_underscore" - ], [ "_strikethrough_no_link", "_inline_element_no_underscore_no_link"