aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2013-06-26 22:48:31 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2013-06-26 22:48:31 +0530
commitaae6c1097a6e5345a011cc2ce066cdc25188f6ad (patch)
treea107d0936c9bdc0458bdd77fdf175502fc3f35e3
parentd2b2ea4d6fd8d8b2529d8df37ef151982c596e44 (diff)
downloadscruf-aae6c1097a6e5345a011cc2ce066cdc25188f6ad.tar.gz
scruf-aae6c1097a6e5345a011cc2ce066cdc25188f6ad.tar.bz2
scruf-aae6c1097a6e5345a011cc2ce066cdc25188f6ad.tar.xz
scruf-aae6c1097a6e5345a011cc2ce066cdc25188f6ad.zip
modified: parsers/CodeBlocks.java ( code blocks are wrapped around <pre> element)
-rw-r--r--parsers/CodeBlocks.java4
-rw-r--r--styling/style.css8
2 files changed, 8 insertions, 4 deletions
diff --git a/parsers/CodeBlocks.java b/parsers/CodeBlocks.java
index 75efa27..a783951 100644
--- a/parsers/CodeBlocks.java
+++ b/parsers/CodeBlocks.java
@@ -35,9 +35,9 @@ public class CodeBlocks implements Parser {
StringBuilder replacement = new StringBuilder();
while(matcher.find()) {
replacement.delete(0,replacement.length());
- replacement.append("<div class=\"code\">");
+ replacement.append("<pre>");
replacement.append(lbreak.parse(symbolMap.quote(matcher.group(3))));
- replacement.append("</div>");
+ replacement.append("</pre>");
matcher.appendReplacement(sbuffer,replacement.toString());
}
matcher.appendTail(sbuffer);
diff --git a/styling/style.css b/styling/style.css
index 1929ca3..13dd629 100644
--- a/styling/style.css
+++ b/styling/style.css
@@ -63,9 +63,13 @@ span.monospace {
font-family:monospace;
}
-div.code {
+pre {
+ display:block;
font-family:monospace;
- font-size:0.625em;
+ font-size:0.6em;
+ word-break:break-all;
+ word-wrap:break-word;
+ white-space:pre-wrap;
background-color:#fcfcfc;
margin-left:auto;
margin-right:auto;