swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
135 stars 21 forks source link

HTML Preview does not work with certain Sphinx themes #214

Closed alcarney closed 3 years ago

alcarney commented 3 years ago

All that gets shown is a blank page....

alcarney commented 3 years ago

Noticed an error message that may provide a clue

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at Object.dirname (path.js:583:5)
    at x.getHtmlContent (c:\Users\acarney\.vscode\extensions\swyddfa.esbonio-0.7.0\dist\extension.js:2:2805976)
    at x.reloadView (c:\Users\acarney\.vscode\extensions\swyddfa.esbonio-0.7.0\dist\extension.js:2:2805309)
    at g.buildCompleteCallback (c:\Users\acarney\.vscode\extensions\swyddfa.esbonio-0.7.0\dist\extension.js:2:2804909)
    at c:\Users\acarney\.vscode\extensions\swyddfa.esbonio-0.7.0\dist\extension.js:2:2796801
    at c:\Users\acarney\.vscode\extensions\swyddfa.esbonio-0.7.0\dist\extension.js:2:2880463
    at c:\Users\acarney\.vscode\extensions\swyddfa.esbonio-0.7.0\dist\extension.js:2:2880681
    at Immediate._onImmediate (c:\Users\acarney\.vscode\extensions\swyddfa.esbonio-0.7.0\dist\extension.js:2:2882229)
    at processImmediate (internal/timers.js:461:21)
alcarney commented 3 years ago

Turns out this is actually an issue in the way we handle certain <script> tags when generating the preview