Add current.base and tests for all of current #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I accidentally did this on top of the branch with all the preprocessor updates, sorry about that.
current.source and current.path tests
Unfortunately my git skills aren’t good enough to sort all that out. I believe you would want everything from kennethormandy@2826c38 though, as it has the
current.path
andcurrent.source
tests.current.base
Essentially,
current.base
is a string of../
s forcurrent.path.length
. I haven’t tested it on Windows yet, I’m not sure where your path fixes happen, so that could be an issue.Alternatively, some kind of url function
For
current.base
, as we discussed, it’d probably be better to have a function, something like:…so you could compile with with relative or absolute links, or have an
.html
extension tacked on as appropriate. It would also have to check to see if there was an extension already, because if you had an image, you might still want the relative pathing:It’s possible that
current.base
could still be useful, and thepath()
function or whatever we call it could use it.