make an exception for 'Ox.My' when creating doc links

This commit is contained in:
rolux 2012-06-26 03:15:27 +02:00
parent f6a7d0a059
commit 9b79a0e585

View file

@ -296,14 +296,20 @@ Ox.load(function() {
+ '<span class="Ox\\w+">([\\w\\$]+)<\\/span>', + '<span class="Ox\\w+">([\\w\\$]+)<\\/span>',
'g' 'g'
), ),
function (str) { function(match) {
return '<a href="#doc/' + Ox.stripTags(str) var string = Ox.stripTags(match);
+ '" class="doclink">' + str + '</a>'; return string == 'Ox.My' ? string
: '<a href="#doc/' + string
+ '" class="doclink">' + match + '</a>';
} }
], ],
comment: [ comment: [
/\b(Ox\.[\w\$]+)/g, /\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: [
/\{size\.(\w+)\}/g, /\{size\.(\w+)\}/g,