Include 指令支持矩阵
本文档描述了在以下环境中如何解析 include
指令:
-
浏览器(XMLHttpRequest IO 模块)
-
Node.js
-
MRI(Ruby)
path | Base dir | Browser | Node.js | MRI |
---|---|---|---|---|
path/to/file.adoc |
👌 |
👌 |
❌ The resolved path is /root/file:/root/path/to/file.adoc. |
|
path/../path/to/file.adoc |
👌 |
👌 |
❌ The resolved path is /root/file:/root/path/to/file.adoc. |
|
👌 |
👌 |
❌ include uri not readable: file:///root/path/to/file.adoc. |
||
👌 |
👌 |
❌ include uri not readable: file:///root/path/../path/to/file.adoc. |
||
path/to/file.adoc |
❌ Unable to get the current directory in a reliable way. |
👌 |
👌 |
|
👌 |
👌 |
❌ include uri not readable: file:///root/path/to/file.adoc. |
||
👌 |
👌 |
👌 |
||
👌 |
👌 |
👌 |
||
file.adoc |
👌 |
❌ SecurityError: Jail is not an absolute path: https://raw.com/main |
❌ include file not found: {local_pwd}/https:/raw.com/main/file.adoc. |
|
../v1.5.0/file.adoc |
👌 |
❌ SecurityError: Jail is not an absolute path: https://raw.com/main |
❌ include file not found: {local_pwd}/https:/raw.com/main/file.adoc. |
|
👌 |
❌ The xmlhttprequest module does not expand path and therefore returns a 404. |
👌 |