mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	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.
This commit is contained in:
		| @@ -136,7 +136,7 @@ function togglePreviewDisplay(previewable) { | ||||
|   if (!previewTab) return; | ||||
|  | ||||
|   if (previewable) { | ||||
|     const newUrl = (previewTab.getAttribute('data-url') || '').replace(/(.*)\/.*/i, `$1/markup`); | ||||
|     const newUrl = (previewTab.getAttribute('data-url') || '').replace(/(.*)\/.*/, `$1/markup`); | ||||
|     previewTab.setAttribute('data-url', newUrl); | ||||
|     previewTab.style.display = ''; | ||||
|   } else { | ||||
|   | ||||
| @@ -32,7 +32,7 @@ export function isDarkTheme() { | ||||
|  | ||||
| // strip <tags> from a string | ||||
| export function stripTags(text) { | ||||
|   return text.replace(/<[^>]*>?/gm, ''); | ||||
|   return text.replace(/<[^>]*>?/g, ''); | ||||
| } | ||||
|  | ||||
| // searches the inclusive range [minValue, maxValue]. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user