comparison src/org/nwoca/ssdt/tools/html2wiki/PreTagTransformer.java @ 7:a634b4d554d4

Minor fixups >, random smilies :), etc. Fixed blockquote. Handle escaping brackets outside pre tag.
author smith@nwoca.org
date Thu, 27 Jan 2011 18:07:28 -0500
parents f8b1ea49d065
children
comparison
equal deleted inserted replaced
6:99f293bd507f 7:a634b4d554d4
12 Matcher matcher = pattern.matcher(buffer); 12 Matcher matcher = pattern.matcher(buffer);
13 13
14 boolean first = true; 14 boolean first = true;
15 while (matcher.find( first ? 0 : matcher.end())) { 15 while (matcher.find( first ? 0 : matcher.end())) {
16 String temp = buffer.substring(matcher.start(),matcher.end()); 16 String temp = buffer.substring(matcher.start(),matcher.end());
17 temp = temp.replaceAll("(?m)^\\s","\r "); 17 temp = temp.replaceAll("\\\\\\[","[");
18 temp = temp.replaceAll("\\\\\\]","]");
18 buffer.replace(matcher.start(),matcher.end(),temp); 19 buffer.replace(matcher.start(),matcher.end(),temp);
19 first = false; 20 first = false;
20 } 21 }
21 22
22 } 23 }
23 24
24 public String toString() { 25 public String toString() {
25 return "Preserving <pre> tag spacing"; 26 return "Unescaping Pre tag contents";
26 } 27 }
27 28
28 } 29 }