added a codeBlock tag to creole and changed wiki-show and project-home pages to use prettify to render the codeBlock regiion
This commit is contained in:
parent
82102eab8b
commit
812bdf6547
@ -324,6 +324,14 @@ var Url = {
|
|||||||
regex: /(^|\n)\{\{\{\n((.*\n)*?)\}\}\}(\n|$)/,
|
regex: /(^|\n)\{\{\{\n((.*\n)*?)\}\}\}(\n|$)/,
|
||||||
replaceRegex: /^ ([ \t]*\}\}\})/gm,
|
replaceRegex: /^ ([ \t]*\}\}\})/gm,
|
||||||
replaceString: '$1' },
|
replaceString: '$1' },
|
||||||
|
|
||||||
|
/* codeBlock is to be used together with prettify */
|
||||||
|
codeBlock: { tag: 'pre', capture: 2,
|
||||||
|
attrs: { 'class': 'prettyprint' },
|
||||||
|
regex: /(^|\n)\[\[\[\n((.*\n)*?)\]\]\](\n|$)/,
|
||||||
|
replaceRegex: /^ ([ \t]*\]\]\])/gm,
|
||||||
|
replaceString: '$1' },
|
||||||
|
|
||||||
tt: { tag: 'tt',
|
tt: { tag: 'tt',
|
||||||
regex: /\{\{\{(.*?\}\}\}+)/, capture: 1,
|
regex: /\{\{\{(.*?\}\}\}+)/, capture: 1,
|
||||||
replaceRegex: /\}\}\}$/, replaceString: '' },
|
replaceRegex: /\}\}\}$/, replaceString: '' },
|
||||||
@ -496,7 +504,7 @@ var Url = {
|
|||||||
|
|
||||||
g.root = {
|
g.root = {
|
||||||
children: [ g.h1, g.h2, g.h3, g.h4, g.h5, g.h6,
|
children: [ g.h1, g.h2, g.h3, g.h4, g.h5, g.h6,
|
||||||
g.hr, g.ulist, g.olist, g.preBlock, g.table, g.ohlohWidget ],
|
g.hr, g.ulist, g.olist, g.preBlock, g.codeBlock, g.table, g.ohlohWidget ],
|
||||||
fallback: { children: [ g.paragraph ] }
|
fallback: { children: [ g.paragraph ] }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user