diff options
-rw-r--r-- | rst_context.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/rst_context.lua b/rst_context.lua index a51f606..1ac5f96 100644 --- a/rst_context.lua +++ b/rst_context.lua @@ -203,6 +203,10 @@ function rst_context.target (tab) return insert end +function rst_context.inline_internal_target (str) + return "\\\\reference[__target_" .. rst_context.whitespace_to_underscore(str) .."]{}" +end + function rst_context.escape (str) str = str:gsub("\\(.)", "%1") return str @@ -224,7 +228,7 @@ local inline_parser = P{ + V"emphasis" + V"inline_literal" + V"interpreted_text" --- + V"inline_internal_target" -- TODO + + V"inline_internal_target" -- TODO + V"footnote_reference" -- + V"substitution_reference" -- TODO + V"link_standalone") @@ -378,6 +382,13 @@ local inline_parser = P{ citation_reference_label = V"letter" * (1 - V"rsquare")^1, + inline_internal_target = V"underscore" + * V"bareia" + * Cs((1 - V"bareia")^1) + * V"bareia" + / rst_context.inline_internal_target + , + -------------------------------------------------------------------------------- -- Urls -------------------------------------------------------------------------------- |