make an exception for 'Ox.My' when creating doc links
This commit is contained in:
parent
f6a7d0a059
commit
9b79a0e585
1 changed files with 10 additions and 4 deletions
14
index.js
14
index.js
|
@ -296,14 +296,20 @@ Ox.load(function() {
|
|||
+ '<span class="Ox\\w+">([\\w\\$]+)<\\/span>',
|
||||
'g'
|
||||
),
|
||||
function (str) {
|
||||
return '<a href="#doc/' + Ox.stripTags(str)
|
||||
+ '" class="doclink">' + str + '</a>';
|
||||
function(match) {
|
||||
var string = Ox.stripTags(match);
|
||||
return string == 'Ox.My' ? string
|
||||
: '<a href="#doc/' + string
|
||||
+ '" class="doclink">' + match + '</a>';
|
||||
}
|
||||
],
|
||||
comment: [
|
||||
/\b(Ox\.[\w\$]+)/g,
|
||||
'<a href="#doc/$1" class="OxMonospace doclink">$1</a>'
|
||||
function(match) {
|
||||
return match == 'Ox.My' ? match
|
||||
: '<a href="#doc/' + match
|
||||
+ '" class="OxMonospace doclink">' + match + '</a>'
|
||||
}
|
||||
],
|
||||
size: [
|
||||
/\{size\.(\w+)\}/g,
|
||||
|
|
Loading…
Reference in a new issue