jrburke/requirejs — pull request #461 by praxxis (2012-09-13 22:58:00+00:00)
Title: Fix a bug with plugins and relative paths (+ tests)

With a certain combination of paths the text plugin was failing to correctly normalise a relative path. Without the (1 line!) patch, the text include would resolve as:

tests/plugins/relativePath/relative/nested2/relative/nested2/text/text.html

instead of the correct

tests/plugins/relativePath/relative/nested2/text/text.html

It seemed to be normalising the path twice.

Honestly I couldn't grok the internals of Require well enough to know if this is the best fix, but it does fix the test case (and the more extensive configuration where the issue was first spotted) and didn't seem to break any other unit tests. If there's a better way to do it I'm all ears.