Changeset 46 in default


Ignore:
Timestamp:
11/30/10 13:45:49 (13 years ago)
Author:
zeiss
Message:
 
Location:
trunk/de.ugoe.cs.swe.bnftools.ebnf.ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/resources/html-header.html

    r41 r46  
    48124812<div class=WordSection1> 
    48134813 
    4814 <h2><a name="_Toc261876643"></a><a name="_Toc260041979"><span style='mso-bookmark: 
    4815 _Toc261876643'><span lang=EN-GB>A.1.6<span style='mso-tab-count:1'>    </span>TTCN&#8209;3 
    4816 syntax BNF productions</span></span></a></h2> 
  • trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java

    r45 r46  
    303303                 
    304304                lastWasSectionHeading=true; 
    305                  
    306                 metaText("<h3><span lang=EN-GB>\n"); 
    307305                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                } 
    308322                textTransformed(text, StringEscapeUtils.escapeHtml(text).replaceAll("[\n\r]", "")); 
    309323//              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                } 
    311331        } 
    312332 
Note: See TracChangeset for help on using the changeset viewer.