This fixes a situation when we don't give any options for the plugin and we are processing more than one file:
First file:
file.path is "X/Y/A.html"
[OK] options.rootpath is "X"
[OK] options.htmlpath is "Y/X/A.html"
Second file:
file.path is "X/Y/B.html"
[NOT] options.rootpath is "X"
[NOT] options.htmlpath is "Y/X/A.html"
So it no options was specified, it was creating options object with properties that had values of the first file, which of course was causing a n Error because it could not load a inlined stylsheet from the right location (in the second processed file).
This fixes a situation when we don't give any options for the plugin and we are processing more than one file:
First file: file.path is "X/Y/A.html" [OK] options.rootpath is "X" [OK] options.htmlpath is "Y/X/A.html"
Second file: file.path is "X/Y/B.html" [NOT] options.rootpath is "X" [NOT] options.htmlpath is "Y/X/A.html"
So it no options was specified, it was creating options object with properties that had values of the first file, which of course was causing a n Error because it could not load a inlined stylsheet from the right location (in the second processed file).