fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
306 stars 59 forks source link

Cross-platform transclusion #119

Closed t-beckmann closed 9 years ago

t-beckmann commented 9 years ago

Using relative paths the transclude feature works on Windows as well as on Linux only when using the native path separator characters. When writing markdown to be processed on both platforms however I'm facing the issue that mmd does not compute the transclusion base path correctly.

The changes fix this and allow using forward as well as backward slashes on Windows platform. This way, one can use forward slashes for cross-platform markdown files including transclusions.

Notice, Windows POSIX treats forward and backward slashes equal for compatibility reasons. The C library uses POSIX API under the hood and thus accepts both styles of separators.

fletcher commented 9 years ago

Sorry for the delay, but thanks for submitting this. I implemented the fix slightly differently, but I think the result is the same. Let me know if you find any problems (I don't use Windows very often, so I don't have any good real world tests).