Skip to content

Commit

Permalink
Merge pull request #10 from TheDragonCode/1.x
Browse files Browse the repository at this point in the history
Fixed some [plugin:vite:vue] Whitespace was expected.
  • Loading branch information
andrey-helldar authored Mar 2, 2023
2 parents e76d1e8 + 10de7db commit ab76af0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/node/plugins/transformers/blobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { Manager } from '../manager.js'
export const blobsTransformer = Manager.create()
.setKey('blob')
.setCompactPatterns([
/\[[\w\d\s`]+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/blob\/([\w\d\/.\-_]+)\)/g,
/https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/blob\/([\w\d\/.\-_]+)/g
/\[[\w\d\s`]+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/blob\/([\w\d\/.\-_]+)\/?\)/g,
/(?<!:")(?<=^|\s|>)https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/blob\/([\w\d\/.\-_]+)\/?/g
])
2 changes: 1 addition & 1 deletion src/node/plugins/transformers/commit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Manager } from '../manager.js'

export const commitTransformer = Manager.create()
.setKey('commit')
.setAsCode()
.setCompactPatterns([
/<a.*href\s?=\s?"?https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/commit\/([\w\d]{40})"?.*>.*<\/a>/g,
/\[[\w\d\s`]+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/commit\/([\w\d]{40})\)/g,
Expand All @@ -11,4 +12,3 @@ export const commitTransformer = Manager.create()
.setExpandValueReplaces({
2: (value: string) => value.substring(0, 7)
})
.setAsCode()
1 change: 1 addition & 0 deletions src/node/plugins/transformers/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Manager } from '../manager.js'
export const compareTransformer = Manager.create()
.setKey('compare')
.setCompactPatterns([
/<a.*href\s?=\s?"?https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/compare\/([\w\d.\-]+)\.{3}([\w\d.\-]+)\/?"?.*>.*<\/a>/g,
/\[[\s\w\d`.\-]+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/compare\/([\w\d.\-]+)\.{3}([\w\d.\-]+)\)/g,
/https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/compare\/([\w\d.\-]+)\.{3}([\w\d.\-]+)/g,
/([\w\d.\-]+)\.{3}([\w\d.\-]+)/g
Expand Down
5 changes: 3 additions & 2 deletions src/node/plugins/transformers/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export const pullRequestTransformer = Manager.create()
.setKey('pull')
.setSplitter('#', true)
.setCompactPatterns([
/\[[\s`#@]*\d+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/pull\/(\d+)\)/g,
/https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/pull\/(\d+)/g,
/<a.*href\s?=\s?"?https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/pull\/(\d+)\/?"?.*>.*<\/a>/g,
/\[[\s`#@]*\d+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/pull\/(\d+)\/?\)/g,
/https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/pull\/(\d+)\/?/g,
/#(\d+)/g
])
7 changes: 4 additions & 3 deletions src/node/plugins/transformers/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Manager } from '../manager.js'
export const tagsTransformer = Manager.create()
.setKey('tag')
.setCompactPatterns([
/\[[\s\w\d`.\-]+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/releases\/tag\/(v?\d+\.\d+\.\d+-?\w*\.?\d*)\)/g,
/https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/releases\/tag\/(v?\d+\.\d+\.\d+-?\w*\.?\d*)/g,
/(?<!:)(?<=^|\s)(v?\d+\.\d+\.\d+-?\w*\.?\d*)(?<!:)/g
/<a.*href\s?=\s?"?https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/releases\/tag\/(v?\d+\.\d+\.\d+-?\w*\.?\d*)\/?"?.*>.*<\/a>/g,
/\[[\s\w\d`.\-]+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/releases\/tag\/(v?\d+\.\d+\.\d+-?\w*\.?\d*)\/?\)/g,
/https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/releases\/tag\/(v?\d+\.\d+\.\d+-?\w*\.?\d*)\/?/g,
/(?<!:)(?<=^|\s|>)(v?\d+\.\d+\.\d+-?\w*\.?\d*)(?<!:)/g
])
.setExpandFormat('$1/$key/$2', '$1/releases/tag/$2')
.setExpandValueReplaces({
Expand Down
2 changes: 1 addition & 1 deletion src/node/plugins/transformers/trees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export const treesTransformer = Manager.create()
.setKey('tree')
.setCompactPatterns([
/\[[\s`#@]*\d+]\(https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/tree\/([\d\w.\-_\/]+)\)/g,
/(?<!:")(?<=^|\s)https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/tree\/([\d\w.\-_\/]+)/g
/(?<!:")(?<=^|\s|>)https:\/\/github\.com\/([\w\d\-_]+)\/([\w\d\-_]+)\/tree\/([\d\w.\-_\/]+)/g
])

0 comments on commit ab76af0

Please sign in to comment.