Changeset 46 in default for trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui
- Timestamp:
- 11/30/10 13:45:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java
r45 r46 303 303 304 304 lastWasSectionHeading=true; 305 306 metaText("<h3><span lang=EN-GB>\n");307 305 String text = node.getSectionHeader().replaceAll("[\n\r]", ""); 306 307 int sectionType = 0; // 0=h3, 1=h4, 2=h2 308 309 if (text.replaceAll("[\n\r]", "").matches("^A\\.\\d\\.\\d\\.\\d.\\d[ \t]+.*")) 310 sectionType = 1; 311 312 if (text.replaceAll("[\n\r]", "").matches("^A\\.\\d\\.\\d[ \t]+.*")) 313 sectionType = 2; 314 315 if (sectionType == 0) { 316 metaText("<h3><span lang=EN-GB>\n"); 317 } else if (sectionType == 1) { 318 metaText("<h4><span lang=EN-GB>\n"); 319 } else { 320 metaText("<h2><span lang=EN-GB>\n"); 321 } 308 322 textTransformed(text, StringEscapeUtils.escapeHtml(text).replaceAll("[\n\r]", "")); 309 323 // textTransformed(text, text.replaceAll("[\t]", "\\<span style='mso-tab-count:1'\\>")); 310 metaText("\n</span></h3>\n"); 324 if (sectionType == 0) { 325 metaText("\n</span></h3>\n"); 326 } else if (sectionType == 1) { 327 metaText("\n</span></h4>\n"); 328 } else { 329 metaText("\n</span></h2>\n"); 330 } 311 331 } 312 332
Note: See TracChangeset
for help on using the changeset viewer.