repo.or.cz
/
mediawiki.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Import: Handle uploads with sha1 starting with 0 properly
[mediawiki.git]
/
resources
/
src
/
mediawiki
/
mediawiki.template.regexp.js
blob
3ec0a1f5c95f3e9cd1f034e3afaeeb78256dc6c0
1
mediaWiki.template.registerCompiler( 'regexp', {
2
compile: function ( src ) {
3
return {
4
render: function () {
5
return new RegExp(
6
src
7
// Remove whitespace
8
.replace( /\s+/g, '' )
9
// Remove named capturing groups
10
.replace( /\?<\w+?>/g, '' )
11
);
12
}
13
};
14
}
15
} );