瀏覽代碼

Replaces broken tokens with an empty string

main
Eric Amodio 4 年之前
父節點
當前提交
fdf1e7678a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/system/string.ts

+ 1
- 1
src/system/string.ts 查看文件

@ -74,7 +74,7 @@ const pathStripTrailingSlashRegex = /\/$/g;
const tokenRegex = /\$\{(".*?"|\W*)?([^|]*?)(?:\|(\d+)(-|\?)?)?(".*?"|\W*)?\}/g;
const tokenSanitizeRegex = /\$\{(?:".*?"|\W*)?(\w*?)(?:".*?"|[\W\d]*)\}/g;
// eslint-disable-next-line no-template-curly-in-string
const tokenSanitizeReplacement = '$${this.$1}';;
const tokenSanitizeReplacement = "$${this.$1 ?? ''}";;
export interface TokenOptions {
collapseWhitespace: boolean;

Loading…
取消
儲存