Changeset 588

Show
Ignore:
Timestamp:
01/30/10 15:12:31 (3 years ago)
Author:
stefan
Message:

handle more than one citation in \cite{}

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/jlatexeditor/codehelper/BibCodeHelper.java

    r586 r588  
    1212  public BibCodeHelper(BackgroundParser backgroundParser) { 
    1313    this.backgroundParser = backgroundParser; 
    14     pattern = new PatternPair("\\\\cite\\{([^{}]*)"); 
     14    pattern = new PatternPair("\\\\cite\\{([^{},]+,)?([^{},]*)"); 
    1515  } 
    1616 
     
    1818  public boolean matches() { 
    1919    if (super.matches()) { 
    20       word = params.get(0); 
     20      word = params.get(1); 
    2121      return true; 
    2222    } 
  • trunk/src/sce/codehelper/WordWithPos.java

    r586 r588  
    1818    this.row = row; 
    1919    this.startColumn = startColumn; 
    20     this.endColumn = startColumn + word.length(); 
     20    this.endColumn = startColumn + (word == null ? 0 : word.length()); 
    2121  } 
    2222