Changeset 217 for trunk/lib/Parser.cc


Ignore:
Timestamp:
Oct 1, 2006, 9:58:52 AM (15 years ago)
Author:
Peter Johansson
Message:

refs #69 fixed so it works for '#' and '%'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Parser.cc

    r214 r217  
    3838  {
    3939    std::ifstream is(path.c_str());
    40     if (match_end(path.begin(), path.end(), ".ac") ||
    41         match_end(path.begin(), path.end(), ".am") ||
    42         match_end(path.begin(), path.end(), ".pl") ||
    43         match_end(path.begin(), path.end(), ".pm") ||
    44         match_end(path.begin(), path.end(), ".sh"))
     40    if (match_end(path.rbegin(), path.rend(), ".ac") ||
     41        match_end(path.rbegin(), path.rend(), ".am") ||
     42        match_end(path.rbegin(), path.rend(), ".pl") ||
     43        match_end(path.rbegin(), path.rend(), ".pm") ||
     44        match_end(path.rbegin(), path.rend(), ".sh"))
    4545      line_com_mode(is, "#");
    46     else if (match_end(path.begin(), path.end(), ".tex"))
     46    else if (match_end(path.rbegin(), path.rend(), ".tex"))
    4747      line_com_mode(is, "%");
    4848    else
Note: See TracChangeset for help on using the changeset viewer.