relax jslint-warning against space-character in regexp? #361
-
@douglascrockford, i frequent regexp-use-cases where the space-character is explicitly specified, e.g. ~/Downloads/jslint$ git grep u0020
.ci.sh: /\n```shell\u0020<!--\u0020shRunWithScreenshotTxt\u0020(.*?)\u0020-->\n([\S\s]*?\n)```\n/g
.ci.sh: /\n\n#\u0020(v\d\d\d\d\.\d\d?\.\d\d?(.*?)?)\n/g
.ci.sh: /^let\u0020jslint_edition\u0020=\u0020".*?";$/m
index.html: /^([^\n\u0020@].*?)[,{:].*?$/gm
index.html: /^0\u0020(?:(body\u0020>\u0020)?(?:\.button|\.readonly|\.styleColorError|\.textarea|\.uiAnimateSlide|a|base64|body|code|div|input|pre|textarea)(?:,|\u0020\{))|^[1-9]\d*?\u0020#/m
jslint.mjs: /^\u0020{4}at\u0020(?:file|stop|stop_at|test_cause|warn|warn_at)\b.*?\n/gm
jslint.mjs: /\n\u0020{4}at\u0020((?:Object\.\w+?_)?\w+?)\u0020/
jslint.mjs: /\bnode\u0020.*?-e\u0020'\n([\S\s]*?\n)'/gm
jslint.mjs: warn_at("expected_a_b", line, column, "\\u0020", " ");
jslint.mjs: /\n(?:\*\u0020\[`|##\u0020|##\u0020Class:\u0020)`\w+/g
jslint_ci.sh: /\n#\u0020Table\u0020of\u0020Contents$[\S\s]*?\n\n\n/m
jslint_ci.sh: /\n\n\n#\u0020(.*)/g
jslint_ci.sh: /[^\u0020\-0-9A-Z_a-z]/g
jslint_ci.sh: /\u0020/g
jslint_ci.sh: /^(\S+?)\u0020+?\S+?\u0020+?\S+?\u0020+?(\S+?)\t(\S+?)$/gm
jslint_ci.sh: /^(\S+)\u0020(.*?)\n/
jslint_ci.sh: /^git\u0020/
jslint_ci.sh: /[\t\u0020]+$/gm
jslint_ci.sh: /\n+?(\n\u0020*?\})/g
jslint_ci.sh: /\n\/\*\nfile\u0020none\n\*\/\n\/\*jslint-enable\*\/\n([\S\s]+)/
test.mjs: /\u0020{4}/g
test.mjs: /(\n\s*?\/\/\s*?test_cause:\s*?)(\S[\S\s]*?\S)(\n\n\s*?)\u0020*?\S/g
test.mjs: /^\/\/\u0020/gm
test.mjs: /\u0020\/\/jslint-quiet$/gm and would like to improve regexp-readability (and jslint's user-friendliness) by allowing was the original-intent of disallowing |
Beta Was this translation helpful? Give feedback.
Answered by
douglascrockford
Oct 3, 2021
Replies: 1 comment 2 replies
-
Improving regexp-readability is a lost cause. Do what you think best. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
kaizhu256
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Improving regexp-readability is a lost cause.
Do what you think best.