diff options
author | silverwind <me@silverwind.io> | 2023-04-27 04:08:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 22:08:16 -0400 |
commit | 50133b02bd381b7ee4da1ec4b7b637d5b7552678 (patch) | |
tree | 88482ba6c25ed952fa4b84f7d92363ac231603ad /docs/assets | |
parent | cf465b472166ccf6d3e001e3043e4bf43e16e6b3 (diff) | |
download | gitea-50133b02bd381b7ee4da1ec4b7b637d5b7552678.tar.gz gitea-50133b02bd381b7ee4da1ec4b7b637d5b7552678.zip |
Add eslint-plugin-regexp (#24361)
Add
[`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp)
and fix discovered issues. Config is mostly the recommended one, but I
relaxed a few rules.
Diffstat (limited to 'docs/assets')
-rw-r--r-- | docs/assets/js/search.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js index 315a5ebd91..f731e0b224 100644 --- a/docs/assets/js/search.js +++ b/docs/assets/js/search.js @@ -138,8 +138,8 @@ function populateResults(result) { function render(templateString, data) { let conditionalMatches, copy; - const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*}/g; - // since loop below depends on re.lastInxdex, we use a copy to capture any manipulations whilst inside the loop + const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*\}/g; + // since loop below depends on re.lastIndex, we use a copy to capture any manipulations whilst inside the loop copy = templateString; while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) { if (data[conditionalMatches[1]]) { |