Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Unresolved directive in <stdin> - include::../inc.adoc[] #21

Closed
jmini opened this issue Jan 24, 2015 · 6 comments
Closed

Unresolved directive in <stdin> - include::../inc.adoc[] #21

jmini opened this issue Jan 24, 2015 · 6 comments
Labels
Milestone

Comments

@jmini
Copy link
Contributor

jmini commented Jan 24, 2015

To reproduce this issue, you need two files:

  • asciidoc/test.adoc
  • inc.adoc

The test.adoc file content is:

content from `_src/docs/inc.adoc`.

Hello *world*.

The test.adoc is a full asciidoctor article file (with title, header and so on) similar to the example you can find everywhere. Important is that this file contains:

Some test.

include::../inc.adoc[]

This project does something.

When I try to preview the file in Firefox with the asciidoctor-firefox-addon extension, I get this output:

Some test.

Unresolved directive in <stdin> - include::../inc.adoc[] This project does something. We just haven’t decided what that is yet.

A google search pointed to this issue in asciidoctor.js: #42: includes does not work correctly

@jmini
Copy link
Contributor Author

jmini commented Jan 24, 2015

The mentioned issue "includes does not work correctly" seems to be fixed with asciidoctor/asciidoctor#1081 (see this comment).

This is why I have suggested to update the asciidoctor.js library with #22.

I think an update will fix this issue.

@ggrossetie
Copy link
Member

Resolved by #22

@jmini
Copy link
Contributor Author

jmini commented Feb 6, 2015

My test shows that this isssue is not solved.

dir
|   inc2.adoc
|
\---doc
    |   example-manual.adoc
    |   inc1.adoc
    |
    \---imgs
            sunset.jpg

The example-manual.adoc contains:

= Example Manual
This is a user manual for an example project.

    include::inc1.adoc[]

include::inc1.adoc[]

    include::../inc2.adoc[]

include::../inc2.adoc[]


== Attributes

.Built-in
asciidoctor-version:: {asciidoctor-version}
safe-mode-name:: {safe-mode-name}
docdir:: {docdir}

And I still have the error:

example-manual-preview

Notice that the asciidoctor-version is correct (it was updated).

Can you reopen this?

@ggrossetie ggrossetie reopened this Feb 6, 2015
@ggrossetie
Copy link
Member

I think Firefox cannot get data from a different path from the one you are currently.
The XMLHttpRequest returns NS_ERROR_DOM_BAD_URI.

Ref:
http://ejohn.org/blog/tightened-local-file-security/
https://bugzilla.mozilla.org/show_bug.cgi?id=560488
https://bugzilla.mozilla.org/show_bug.cgi?id=465397
https://bugzilla.mozilla.org/show_bug.cgi?id=230606

@ggrossetie
Copy link
Member

Btw, thanks for your review on the Firefox AMO! 😄

@mojavelinux
Copy link
Member

I think Firefox cannot get data from a different path from the one you are currently.

If I remember correctly from my tests, this is correct. I'm happy to be proven wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants