aboutsummaryrefslogtreecommitdiffstats
path: root/README.EXT
diff options
context:
space:
mode:
authorHartley McGuire <skipkayhil@gmail.com>2024-03-05 20:13:38 -0500
committergit <svn-admin@ruby-lang.org>2024-03-09 03:50:09 +0000
commit5ac6194c2b13856edd7e7bcaaa69a15519fd993e (patch)
tree67ea632e7e391b4c55b3e5a070737ad1c960f0f2 /README.EXT
parent35c20cda7008cc6433ae2e1802c6e3d8f1d40d73 (diff)
downloadruby-5ac6194c2b13856edd7e7bcaaa69a15519fd993e.tar.gz
[ruby/rdoc] Fix ToRdoc generating incorrect {label,name}-lists
Previously, trying to round-trip label-list and name-lists with the ToRdoc converter was not possible: ```ruby doc = <<~RDOC foo :: bar :: hi RDOC markup = RDoc::Markup.parse(doc) markup # => [doc: [list: NOTE [item: ["foo ", "bar"]; [para: "hi"]]]] rt = RDoc::Markup::ToRdoc.new.convert(markup) rt # => "foo\nbar:\n hi\n\n" rt_markup = RDoc::Markup.parse(rt) rt_markup # => [doc: [para: "foo ", "bar:"], [verb: "hi\n"]] ``` This commit addresses the issue by fixing ToRdoc to generate output that can be properly reparsed by RDoc. ToRdoc tests additionally needed to be updated for the new output. The old implementation of `accept_list_item_start` was copied to ToBs because those tests did not pass with the new changes and I am unfamiliar with the `backspace` format. After: ```ruby doc = <<~RDOC foo :: bar :: hi RDOC markup = RDoc::Markup.parse(doc) markup # => [doc: [list: NOTE [item: ["foo ", "bar"]; [para: "hi"]]]] rt = RDoc::Markup::ToRdoc.new.convert(markup) rt # => "foo::\nbar::\n hi\n\n" rt_markup = RDoc::Markup.parse(rt) rt_markup # => [doc: [list: NOTE [item: ["foo", "bar"]; [para: "hi"], blankline]]] ``` https://github.com/ruby/rdoc/commit/c6c51aa900
Diffstat (limited to 'README.EXT')
0 files changed, 0 insertions, 0 deletions