docs: clarify what are considered as absolute paths

This commit is contained in:
Yoichi Hirai
2017-01-03 18:18:16 +01:00
parent 43d3f048e6
commit 9128e73b03
+3 -2
View File
@@ -79,8 +79,9 @@ Paths
-----
In the above, ``filename`` is always treated as a path with ``/`` as directory separator,
``.`` as the current and ``..`` as the parent directory. Path names that do not start
with ``.`` are treated as absolute paths.
``.`` as the current and ``..`` as the parent directory. When ``.`` or ``..`` is followed by a character except ``/``,
it is not considered as the current or the parent directory.
All path names are treated as absolute paths unless they start with the current ``.`` or the parent directory ``..``.
To import a file ``x`` from the same directory as the current file, use ``import "./x" as x;``.
If you use ``import "x" as x;`` instead, a different file could be referenced