csci-1301 / csci-1301.github.io

CSCI 1301: Principles of Computer Programming I course resources
https://csci-1301.github.io/
Creative Commons Attribution 4.0 International
3 stars 14 forks source link

Understand / Document pandoc-include trouble with underscore #155

Open aubertc opened 7 months ago

aubertc commented 7 months ago

I just realized that some include statements were not working correctly, and that the error message in the logs was of the type

[WARNING] Included file not found: code/overflow\_example.cs

I cannot reproduce this bug on my machine, but somehow on the remote execution the _ characters are escaped and breaks the inclusion.

I have (https://github.com/csci-1301/csci-1301.github.io/commit/9c48116c0429ab8cfaf0143d49b752c36ce58b5a) applied a temporary patch by removing the _ from the filename, but we should either understand this bug and fix it, or document it.

aubertc commented 7 months ago

The readme of pandoc-include says

If there are special characters in the filename, use quotes:

but using

!include "code/overflow_example.cs"

as in https://github.com/csci-1301/csci-1301.github.io/commit/f39e45e39081edc9c0db709e4e737f8f4716eb06 did not helped:

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

(because, this time, the " got escaped into ).