`--one-file` does not interpret Markdown by default
The --one-file flag does not interpret Markdown by default in the README.md file (I have not checked other non-source files).
Steps to reproduce
- Run the following commands:
cat << EOF >> foo.rb
# Foobar
# * asd
class Foo
end
EOF
cat << EOF >> README.md
# Foo
EOF
yard doc --one-file --no-save -o . foo.rb
- Open the generated
index.htmlin the browser
Actual Output
The Markdown in the README.md has not been interpreted.
Notice how # Foo is output from the README.md, but the Markdown in the foo.rb file has been interpreted and output as expected.
Expected Output
I expect the Markdown to be interpreted, this is what happens without the --one-file flag:
Environment details:
- OS: macOS 12.0.1
- Ruby version (
ruby -v): ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20] - YARD version (
yard -v): yard 0.9.27
This is not an issue with --one-file or YARD. By default, YARD uses rdoc style markup in .rb files. If you wish to use Markdown as your markup format, you must specify it via -m markdown, see yard doc --help.
I disagree. As you can see on the screenshots, the behavior is different with and without --one-file. I can post a screen recording that shows the whole flow.
Here's a screen recording that shows how I generate the documentation both with and without the --one-file flag. I show both results in the browser side by side:
https://user-images.githubusercontent.com/306980/150955201-062274c5-c202-4571-8b2f-fe446ae973ee.mov