Joker / jade

Jade.go - pug template engine for Go (golang)
BSD 3-Clause "New" or "Revised" License
354 stars 37 forks source link

Absolute paths do not include from baseDir #55

Open mdevnull opened 1 year ago

mdevnull commented 1 year ago

According to the pug documentation absolute include paths should include from basedir and relative from the currently compiled file. Currently all paths are handled as relative.

Pug docs quote:

If the path is absolute (e.g., include /root.pug), it is resolved by prepending options.basedir. Otherwise, paths are resolved relative to the current file being compiled.

Current handling: https://github.com/Joker/jade/blob/master/jade_parse.go#L486-L489