From 0efa872e3a126b1c50e4590f4cc3088efff5646b Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 12 Jul 2010 10:56:13 +0000 Subject: [PATCH] added the wiki class attribute to the pre block generated from creole. changed the style for the pre block just mentioned --- codepot/src/css/common.css | 4 ++++ codepot/src/js/creole.js | 1 + 2 files changed, 5 insertions(+) diff --git a/codepot/src/css/common.css b/codepot/src/css/common.css index 7483ede9..17c3af83 100644 --- a/codepot/src/css/common.css +++ b/codepot/src/css/common.css @@ -216,6 +216,10 @@ body { width: inherit; } +.content .mainarea pre.wiki { + white-space: pre-wrap; +} + .content .mainarea tt { /* padding: .1em .1em .1em .1em; diff --git a/codepot/src/js/creole.js b/codepot/src/js/creole.js index 75c3bbff..1313f05f 100644 --- a/codepot/src/js/creole.js +++ b/codepot/src/js/creole.js @@ -300,6 +300,7 @@ var Url = { br: { tag: 'br', regex: /\\\\/ }, preBlock: { tag: 'pre', capture: 2, + attrs: { 'class': 'wiki' }, regex: /(^|\n)\{\{\{\n((.*\n)*?)\}\}\}(\n|$)/, replaceRegex: /^ ([ \t]*\}\}\})/gm, replaceString: '$1' },