forked from 0x2620/oxjs
allow for replacement function in DocPanel and DocPage
This commit is contained in:
parent
3134b55456
commit
e9f6751748
3 changed files with 38 additions and 28 deletions
|
|
@ -6,6 +6,7 @@ Ox.DocPage <f> DocPage
|
|||
(options, self) -> <o> DocPage object
|
||||
options <o> Options object
|
||||
item <o> doc item
|
||||
replace <[[]]|[]> See Ox.SyntaxHighlighter
|
||||
self <o> Shared private variable
|
||||
@*/
|
||||
Ox.DocPage = function(options, self) {
|
||||
|
|
@ -13,7 +14,8 @@ Ox.DocPage = function(options, self) {
|
|||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
item: {}
|
||||
item: {},
|
||||
replace: []
|
||||
})
|
||||
.options(options || {})
|
||||
.css({
|
||||
|
|
@ -182,6 +184,7 @@ Ox.DocPage = function(options, self) {
|
|||
);
|
||||
$elements.push(
|
||||
Ox.SyntaxHighlighter({
|
||||
replace: self.options.replace,
|
||||
showLineNumbers: true,
|
||||
// fixme: silly
|
||||
source: item.source.map(function(token) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue