Open jacsonsantospht opened 2 years ago
➜ svgtofont git:(master) npm ls cheerio-select
svgtofont@3.17.6 /Users/wangchujiang/project/github/svgtofont
└─┬ cheerio@1.0.0-rc.11
└── cheerio-select@2.1.0
I tested my local is normal. I can't reproduce your error. @jacsonsantospht
当 svg 代码中包含 xml 标签的时候,就会抛出这个异常。
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1625146704082" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2168" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M236.864 64C176.736 64 128 114.144 128 176v672c0 61.856 48.736 112 108.864 112h544.32C841.28 960 896 909.856 896 848V261.12L709.856 64H236.864zM672 128l160 160H698.144A26.144 26.144 0 0 1 672 261.856V128z m106.656 768H245.344C215.904 896 192 871.424 192 841.152V182.848C192 152.576 215.872 128 245.344 128h373.312v164.576c0 30.304 23.904 54.848 53.344 54.848h160v493.728C832 871.424 808.128 896 778.656 896z m-227.36-480H280.704c-14.528-1.696-25.28-15.456-24.576-31.36-1.408-16.352 9.568-30.912 24.576-32.64h270.592c15.04 1.728 25.984 16.288 24.576 32.64 0.736 15.904-10.048 29.664-24.576 31.36z m192.32 160H280.384C266.176 572.928 256 559.552 256 544s10.176-28.928 24.352-32H743.68c14.176 3.072 24.352 16.448 24.352 32s-10.176 28.928-24.352 32z m0 160H280.384C266.176 732.928 256 719.552 256 704s10.176-28.928 24.352-32H743.68c14.176 3.072 24.352 16.448 24.352 32s-10.176 28.928-24.352 32z" fill="#333333" p-id="2169"></path></svg>
并且使用 svgtofont@3.17.4 之前的版本都是正常,3.17.5 之后的版本才会报错。
猜测是 3.17.5 之后依赖的 cheerio@1.0.0-rc.10 升级到了 cheerio@1.0.0-rc.11 导致的。
When runing command: