| 671 | }; |
| 672 | |
| 673 | let _prepareSourceForFormatter = async source => { |
| 674 | if (!formatOptions.autoDecode) { |
| 675 | return source; |
| 676 | } |
| 677 | |
| 678 | try { |
| 679 | let txt = await JsonEnDecode.urlDecodeByFetch(source); |
| 680 | let decodedSource = JsonEnDecode.uniDecode(txt); |
| 681 | return _coerceDecodedJsonSource(source, decodedSource); |
| 682 | } catch (e) { |
| 683 | console.warn('URL解码失败,使用原始内容:', e); |
| 684 | return source; |
| 685 | } |
| 686 | }; |
| 687 | |
| 688 | // 获取JSON格式化的配置信息 |
| 689 | let _getAllOptions = (success) => { |
no test coverage detected