do not add dollar inside comments
fixed bug in comment checking caused by in_list() returning True if the list is empty
simplified comment regexp
don't add dollar outside of php segments