sapegin / grunt-webfont

SVG to webfont converter for Grunt
MIT License
1.1k stars 210 forks source link

relativeRe generates zero width matches in destHtml #237

Open cameronmcefee opened 9 years ago

cameronmcefee commented 9 years ago

When trying to use destHtml to specify a different directory, the filepath rendered in the demo looks like:

src:../octicons/u../octicons/r../octicons/l../octicons/(../octicons/"../octicons/o../octicons/c../octicons/t../octicons/i../octicons/c../octicons/o../octicons/n../octicons/s../octicons/.../octicons/e../octicons/o../octicons/t../octicons/?../octicons/a../octicons/3../octicons/f../octicons/f../octicons/9../octicons/f../octicons/0../octicons/a../octicons/a../octicons/d../octicons/9../octicons/1../octicons/4../octicons/c../octicons/7../octicons/9../octicons/b../octicons/a../octicons/6../octicons/5../octicons/a../octicons/8../octicons/7../octicons/6../octicons/d../octicons/3../octicons/3../octicons/6../octicons/b../octicons/5../octicons/0../octicons/e../octicons/"../octicons/)../octicons/;

From what I can tell it happens here, creating a regexp /(?:)/g which is a bunch of zero width matches.

eddiemonge commented 8 years ago

Set the relativeFontPath: '.'