code: def add_rule(self, pattern, css_class):
          
          #print('adding rule <{0}> <{1}>'.format(pattern, css_class))
          self.__patterns.append(re.compile(pattern, flags=re.U | re.M))
          self.__css_classes.append(css_class)
docs: Add a new rule.
  
          Parameters
          ----------
          pattern: str
              Pattern that is compiled to a regular expression.
          css_class: str
              The class that will corresponds to given pattern.