This repository was archived by the owner on Mar 27, 2023. It is now read-only.
Replies: 1 comment 3 replies
-
The paths allowed depend on the OS used to run the application.
Yes, this is done internally by Java.
Good idea. But currently not yet implemented. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For those attributes that take file paths as their values, like
absolute_or_relative_file_path
(file
attr.),relative_file_path
(src
attr.), etc.:This is something worth mentioning in the PML documentation!
Ideally, using a consistent path representation would be better, for it would promote PML documents portability; also, Windows supports
/
path separators too, whereas Linux and macOS don't support Win-style\
separators.In any case, PML for Windows could handle internally any required path adaptations, by converting on the fly forward-slashes to back-slashes, and adding the
:
separator after the drive letter in absolute paths (e.g.c/Windows/
→C:\Windows\
).It might also be a good idea if PML could validate paths to ensure they are cross-platform, i.e. that they don't contain folder and file names which are invalid (reserved) in either Win, Linux or macOS — in case of a path that is invalid for the current OS, it should fail conversion with an error exit code, whereas paths which are invalid on other OSs should only produce a warning (or fail if a stricter build criteria is set via CLI options, when/if such a feature is implemented along the lines of Asciidoctor
--failure-level WARN
).Surely, this feature needs to take into account parameters inside
*_file_path
attributes, but since validation occurs on-the-fly, at conversion time, it should be easy to validate path after parameters expansion, but maybe a bit more trickier to report errors.Beta Was this translation helpful? Give feedback.
All reactions