chucknorris / warmup

WarmuP - a simple templater / token replacement tool
44 stars 24 forks source link

Bug where string replacement would throw an exception. #10

Closed amirrajan closed 12 years ago

amirrajan commented 12 years ago

Turns out the byte replacement code I got from stack overflow had a bug in it, this pull request contains the fix for the bug.

The bug was:

If you had a string in the content that started with an underscore immediately before the

[underscore][underscore]NAME[underscore][underscore]
token, the string replacement would throw an exception. For example if the content contained
describe[underscore][underscore][underscore]NAME[underscore][underscore]
, it should be replaced with
describe[underscore]NameProvided
....instead it threw an exception.

ferventcoder commented 12 years ago

Doh...

amirrajan commented 12 years ago

It's fixed though :-)