DCsunset / pandoc-include

A pandoc filter to allow file and header inclusion
MIT License
63 stars 14 forks source link

Filename's underscore gets escaped? #45

Closed aubertc closed 6 months ago

aubertc commented 6 months ago

This problem may be too niche to be investigated here, but I thought it could be useful to mention it in case other have the same issue.

When I compile this website on-line (using github's action), then the name of the files see their "_" being escaped, which breaks the inclusion.

As a side note, if I get rid of the underscore but use quotes, that is, if I write!include "code/overflowExample.cs" (using quotes, as indicated at https://github.com/DCsunset/pandoc-include?tab=readme-ov-file#syntax), then the quotes themselves get modified and I get

[WARNING] Included file not found: “code/overflowExample.cs”

I discuss this issue further here: https://github.com/csci-1301/csci-1301.github.io/issues/155#issue-2154630382 . I am writing that this issue may be too niche because I din't see it when I compile this source code locally on my machine (even though github's action uses the exact same version of pandoc and of pandoc-include than I do, the most recent at the time of writing this issue in both cases).

DCsunset commented 6 months ago

The way pandoc-include handles such escaping is that it will convert it to plain text when processing the corresponding line. It's weird that it doesn't work in GitHub actions.

I guess the most possible reason is that some of the dependencies are different or some of the paths are not set correctly. Maybe you can print more info (e.g. dependencies, paths) in the GitHub action to debug it.

aubertc commented 6 months ago

Ok, thanks a lot for getting back to me. Feel free to close this issue, anyone interested in this problem will receive updates through https://github.com/csci-1301/csci-1301.github.io/issues/155#issue-2154630382 .