-
-
Notifications
You must be signed in to change notification settings - Fork 411
Closed
Labels
Description
When generating documentation with the --one-file flag, the generate output contains a JavaScript error.
Steps to reproduce
- Run the following commands:
cat << EOF >> foo.rb # Foobar class Foo end EOF yard doc --one-file --no-save -o . - Open the generate
index.htmlin the browser - Look at the browser console/JavaScript errors
Actual Output
I get this error, both in Safari and Chrome:
ReferenceError: Can't find variable: pathId
postMessage - index.html:780
The error occurs in a JavaScript function called: navExpander. The issue is probably that the --one-file output does not have a navigation bar, but the JavaScript is shared with the default template, which do have a navigation bar.
Expected Output
No JavaScript errors.
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