-
Notifications
You must be signed in to change notification settings - Fork 173
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
Filename case issues for cross-platform document generation #387
Comments
there were some fixes in Penlight a while ago wrt normalization... |
From the current implementation of
there's still a difference in normalisation on Windows vs. other platforms. Could you clarify? |
The normalization is done to compare files to be the same ones. Since Windows is case insesntive it is normalized to lower case to enable the comparison. That will however break if the result is written to a case sensitive file system (eg. render on Windows, and then push the results to github). |
The problem seem to be that the generation (on a single platform) fails as the markdown modules (apologies if I'm using the wrong terminology) are registered using the normalised case filename but looking up the module from a reference doesn't pass through the same normalisation, so using any uppercase characters in the filename (and using the same case in the reference) causes the "module not found" warning. |
It's been a while, but the following will also cause issues; Have a On windows+mac |
It seems LDoc behaves differently on macOS & Windows with respect to resolving file references.
As an example, my config.ld file contains two files:
(Note: Info.md has a capital letter at the start.)
app.lua contains the following reference:
When generating the documentation on macOS this works as expected, but the Windows generation produces a
module not found
warning and the output contains '???' instead of a valid link.I believe the different arises because the filenames are passed through
pl.path.normcase
in LDoc'stools.abspath
function and converted to lower case on Windows which causes the name mismatch.Converting the reference only to lower case (@{info.md|some info}) resolves the issue on Windows but then makes it incompatible with macOS where no case conversion takes place, so the only way to make both platforms work is to only use filenames with lower case letters.
Is this expected behaviour?
The text was updated successfully, but these errors were encountered: