Skip to content

References replacements have no concept of path #4

@stuartf

Description

@stuartf

If you hash two files on different paths that have the same filename all references that get replaced will only use the same hash. For instance if you have MathJax in your path like:

vendor/js/MathJax/jax/input/AsciiMath/config.js
vendor/js/MathJax/jax/input/MathML/config.js
vendor/js/MathJax/jax/input/TeX/config.js
vendor/js/MathJax/jax/output/HTML-CSS/config.js
vendor/js/MathJax/jax/output/NativeMML/config.js
vendor/js/MathJax/jax/output/SVG/config.js

Then when you hash it you get something like:

vendor/js/MathJax/jax/output/SVG/config.02437fe5.js
vendor/js/MathJax/jax/output/HTML-CSS/config.5ada570d.js
vendor/js/MathJax/jax/output/NativeMML/config.53a6cc82.js
vendor/js/MathJax/jax/input/MathML/config.49dbdf64.js
vendor/js/MathJax/jax/input/TeX/config.5b950842.js
vendor/js/MathJax/jax/input/AsciiMath/config.20e7393e.js

So far so good, but when you look in a file that references one of those say vendor/js/MathJax/jax/input/MathML/config.49dbdf64.js for example, you'll find stuff like:

MathJax.InputJax.MathML.loadComplete("config.20e7393e.js");

Which should actually be:

MathJax.InputJax.MathML.loadComplete("config.49dbdf64.js");

Separating the processing into phases won't fix this, but separate tasks will. For a large project it can result in a lot of headaches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions