add term
This commit is contained in:
layouts/partials
static
pkg
hotkeys-js
dist
term
css
icon
ai.pngai.svgapple-touch-icon.pngavatar.pngplayer.pngplayer.svgterm.pngterm.svgterminal.pngterminal.svg
js
json
pkg
axios
bin
GithubAPI.jsRepoBot.js
actions
api.jscheck-build-version.jscontributors.jsgithubAxios.jshelpers
injectContributorsList.jspr.jsssl_hotfix.jsdist
jquery-mousewheel
jquery.ajax
jquery.terminal
bin
css
js
ascii_table.jsdterm.jsjquery.mousewheel-min.jsjquery.terminal.min.jsunix_formatting.jsxml_formatting.js
spec
jquery
12
static/term/pkg/axios/bin/helpers/parser.js
Normal file
12
static/term/pkg/axios/bin/helpers/parser.js
Normal file
@@ -0,0 +1,12 @@
|
||||
export const matchAll = (text, regexp, cb) => {
|
||||
let match;
|
||||
while((match = regexp.exec(text))) {
|
||||
cb(match);
|
||||
}
|
||||
}
|
||||
|
||||
export const parseSection = (body, name, cb) => {
|
||||
matchAll(body, new RegExp(`^(#+)\\s+${name}?(.*?)^\\1\\s+\\w+`, 'gims'), cb);
|
||||
}
|
||||
|
||||
export const parseVersion = (rawVersion) => /^v?(\d+).(\d+).(\d+)/.exec(rawVersion);
|
Reference in New Issue
Block a user