docs: def linebreaks_safe(value, autoescape=True):
      """
      Adds linebreaks only for text that has a newline character.
      """
      if isinstance(value, string_types) and '\n' in value:
          return linebreaks_filter(value, autoescape=autoescape)
  
      return value