Changeset 10739


Ignore:
Timestamp:
2005-10-20T12:06:26+13:00 (19 years ago)
Author:
mdewsnip
Message:

Added a bug fix suggested by Jens Wille: expand any macros in the text to be highlighted before it is highlighted, to prevent the highlighting messing up the macros in rare situations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/highlighttext.cpp

    r9620 r10739  
    7171  remove_space(querystring);
    7272
     73  // Expand macros before highlighting -- by Jens Wille
     74  text_t text_expanded = "";
     75  disp.expandstring(text, text_expanded);
     76
    7377  if ((args["hl"] == 2) || ((*(querystring.begin()) == '"') && (*(querystring.end()-1) == '"'))) {
    74     highlight_phrases(text, querystring, terms, shl, ehl, disp, outconvert, textout);
     78    highlight_phrases(text_expanded, querystring, terms, shl, ehl, disp, outconvert, textout);
    7579  } else {
    76     highlight_terms(text, terms, shl, ehl, disp, outconvert, textout);
     80    highlight_terms(text_expanded, terms, shl, ehl, disp, outconvert, textout);
    7781  }
    7882}
Note: See TracChangeset for help on using the changeset viewer.