Skip to content

Commit

Permalink
Merge branch 'mini' into browser
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed May 1, 2024
2 parents c272e6e + 3affd82 commit e2ffbc5
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,13 @@
"unicorn/no-array-method-this-argument": 2,
"unicorn/no-array-push-push": 2,
"unicorn/no-array-reduce": 2,
"unicorn/no-await-in-promise-methods": 2,
"unicorn/no-instanceof-array": 2,
"unicorn/no-invalid-remove-event-listener": 2,
"unicorn/no-lonely-if": 2,
"unicorn/no-negated-condition": 2,
"unicorn/no-object-as-default-parameter": 2,
"unicorn/no-single-promise-in-promise-methods": 2,
"unicorn/no-static-only-class": 2,
"unicorn/no-typeof-undefined": [
2,
Expand Down
3 changes: 1 addition & 2 deletions bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ else
npm run build:ext
git add -A
git commit -m "chore: bump version to v$1-b"
git push
git tag v$1-b
git push origin v$1-b
git push --follow-tags
fi
fi
34 changes: 17 additions & 17 deletions bundle/bundle.min.js

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion lib/text.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import {escape} from '../util/string';
import {
extUrlChar,
extUrlCharFirst,
escape,
} from '../util/string';
import Parser from '../index';
import {AstNode} from './node';
import type {LintError} from '../base';
Expand All @@ -18,6 +22,7 @@ const source = '<\\s*(?:\\/\\s*)?([a-z]\\w*)' // 疑似标签
+ '((?:^|\\])[^[]*?)\\]+', // `]`
errorSyntax = new RegExp(`${source}|https?[:/]\\/+`, 'giu'),
errorSyntaxUrl = new RegExp(source, 'giu'),
extImage = new RegExp(`^https?:\\/\\/${extUrlCharFirst}${extUrlChar}\\.(?:gif|png|jpg|jpeg)$`, 'iu'),
regexes = {
'[': /[[\]]/u,
'{': /[{}]/u,
Expand Down Expand Up @@ -148,6 +153,8 @@ export class AstText extends AstNode {
continue;
} else if (char === ']' && (index || length > 1)) {
errorRegex.lastIndex--;
} else if (char === 'h' && index === 0 && type === 'ext-link-text' && extImage.test(data)) {
continue;
}
const startIndex = start + index,
endIndex = startIndex + length,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"test:real": "node dist/test/real.js"
},
"devDependencies": {
"@bhsd/codemirror-mediawiki": "^2.1.11",
"@bhsd/codemirror-mediawiki": "^2.10.0",
"@codemirror/lint": "^6.4.2",
"@cypress/request": "^3.0.1",
"@stylistic/eslint-plugin": "^1.5.4",
Expand All @@ -71,9 +71,9 @@
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-regexp": "^2.2.0",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-unicorn": "^52.0.0",
"http-server": "^14.1.0",
"monaco-editor": "^0.47.0",
"monaco-editor": "^0.48.0",
"stylelint": "^16.1.0",
"stylelint-config-recommended": "^14.0.0",
"typescript": "^5.3.3",
Expand Down

0 comments on commit e2ffbc5

Please sign in to comment.