-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional include inside an include file raises an Unresolved directive
#1580
Comments
This feature is not implemented in a browser because it relies on In other words, we cannot check that the file exists without doing an asciidoctor.js/packages/core/lib/asciidoctor/js/asciidoctor_ext/browser/reader.rb Lines 3 to 39 in bb39bb2
|
Another idea is to catch the exception when the request for the file fails and suppress the behavior if the optional option is set. I haven't looked to see if there is an opportunity in the code to handle it that way. That's just the idea in theory. |
Technically it's possible but not practical since we would need to monkey patch at different locations:
Asciidoctor eagerly check that the file exists (using |
Say we have a root file with an include directive:
Then, the test file:
The expected result was just the text from both files (
Root
andTest
), but I get aUnresolved directive
error:Given the second include is optional, the error should not appear.
The text was updated successfully, but these errors were encountered: