Skip to content

Commit

Permalink
🐛 Resolves asciidoctor#240, set the base directory
Browse files Browse the repository at this point in the history
Otherwise Firefox cannot resolve include directive with relative path.
  • Loading branch information
ggrossetie committed Apr 19, 2018
1 parent 402dbcf commit c24a412
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/js/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,12 @@ asciidoctor.browser.renderer = (webExtension, document, Constants, Settings, Dom
if (attributesQueryParameters.length > 0) {
Array.prototype.push.apply(attributes, attributesQueryParameters);
}
const parts = href.split('/'); // break the string into an array
parts.pop(); // remove its last element
const pwd = parts.join('/');
return {
'safe': safeMode,
'base_dir': pwd,
// Force backend to html5
'backend': 'html5',
// Pass attributes as String
Expand Down

0 comments on commit c24a412

Please sign in to comment.