Changeset 392:0de1dbff9f5e in livinglogic.java.ul4

Show
Ignore:
Timestamp:
02/21/11 15:54:11 (8 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Fix tokenizing tags with line feed. Switch default locale to english.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/src/com/livinglogic/ul4/InterpretedTemplate.java

    r387 r392  
    148148        this.source = null; 
    149149        this.opcodes = new LinkedList<Opcode>(); 
    150         this.defaultLocale = Locale.GERMANY; 
     150        this.defaultLocale = Locale.ENGLISH; 
    151151    } 
    152152 
     
    160160        this.enddelim = enddelim; 
    161161        this.opcodes = opcodes.subList(startindex, endindex); 
    162         this.defaultLocale = Locale.GERMANY; 
     162        this.defaultLocale = Locale.ENGLISH; 
    163163    } 
    164164 
     
    16211621    public static List<Location> tokenizeTags(String source, String startdelim, String enddelim) 
    16221622    { 
    1623         Pattern tagPattern = Pattern.compile(escapeREchars(startdelim) + "(printx|print|code|for|if|elif|else|end|break|continue|render|def|note)(\\s*((.|\\n)*?)\\s*)?" + escapeREchars(enddelim)); 
     1623        Pattern tagPattern = Pattern.compile(escapeREchars(startdelim) + "(printx|print|code|for|if|elif|else|end|break|continue|render|def|note)(\\s*(.*?)\\s*)?" + escapeREchars(enddelim), Pattern.DOTALL); 
    16241624        LinkedList<Location> tags = new LinkedList<Location>(); 
    16251625        if (source != null)