asciidoctor / atom-asciidoc-preview

⚛ AsciiDoc preview for the Atom editor.
https://atom.io/packages/asciidoc-preview
MIT License
141 stars 42 forks source link

include:: Issues with file paths. #277

Open carlvon1800 opened 6 years ago

carlvon1800 commented 6 years ago

Description

Paths seems to have a lot of issues with this plugin, under Windows atleaste. I have tested the document with asciidoctor and it seems ok.

Screenshots

Unresolved directive in - include::../test.adoc[]

Syntax example

include::../test.adoc[]
underscoredje commented 6 years ago

Same thing on Fedora. Exports on PDF include the file. Preview and exports on HTML give this error

mojavelinux commented 6 years ago

In order to resolve an include file in a parent directory, you must set the safe mode of the add-on to "unsafe". The default is "safe". In safe mode, you can only resolve files inside the directory structure of the master file.

(Btw, this is true since the plugin sets the base directory option. If the base directory option was not set, then there would be no concept of a current directory and thus files could be resolved from anywhere. The base directory acts as a jail).