Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10272


Ignore:
Timestamp:
Feb 15, 2015, 9:37:54 PM (9 years ago)
Author:
landauf
Message:

reverted a part of the changes from r10264. only single lua-tags between quotes should be filtered, not pairs of tags.
"<?lua" → filtered
"<?lua code() ?>" → not filtered

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/Loader.cc

    r10269 r10272  
    340340        {
    341341            std::map<size_t, bool>::iterator it = luaTags.begin();
    342             while(it != luaTags.end())
    343             {
    344                 if (isBetweenQuotes(text, it->first))
     342            std::map<size_t, bool>::iterator it2 = it;
     343            bool bBetweenQuotes = false;
     344            size_t pos = 0;
     345            while ((pos = getNextQuote(text, pos)) != std::string::npos)
     346            {
     347                while ((it != luaTags.end()) && (it->first < pos))
    345348                {
    346                     luaTags.erase(it++);
     349                    if (bBetweenQuotes)
     350                    {
     351                        it2++;
     352                        if (it->second && !(it2->second) && it2->first < pos)
     353                            it = ++it2;
     354                        else
     355                            luaTags.erase(it++);
     356                    }
     357                    else
     358                        ++it;
    347359                }
    348                 else
    349                 {
    350                     ++it;
    351                 }
     360                bBetweenQuotes = !bBetweenQuotes;
     361                pos++;
    352362            }
    353363        }
Note: See TracChangeset for help on using the changeset viewer.