freeCodeCamp / camper-gitter-bot

Finally, robotic beings rule the world.
BSD 3-Clause "New" or "Revised" License
96 stars 59 forks source link

"Thank you" should be excluded from code. #52

Open learnor opened 8 years ago

learnor commented 8 years ago

If certain key words like "thanks" "thank you" appear in your code quoted between ``` ````, the camperbot still send brownies to people mentioned.

SaintPeter commented 8 years ago

We agree. If you can come up with a Regex that does that, we'd love to see it. It's a non-trivial problem.

ghost commented 8 years ago

https://regex101.com/r/eG1oG7/1 @SaintPeter, If we to do an initial replace on the text something like this might work.

SaintPeter commented 8 years ago

@noncentz That works great for multiline code (```). Great work. What about inline code?

thanks

ghost commented 8 years ago

@SaintPeter , https://regex101.com/r/eG1oG7/6 . We're almost there, it's going to need an edge case for comments too.

SaintPeter commented 8 years ago

Great work, keep it up!