  
  from django.utils.html import escape
  from django.utils.safestring import mark_safe
  from rest_framework.compat import apply_markdown
  from rest_framework.settings import api_settings
  from textwrap import dedent
  import re
  
  
  def remove_trailing_string(content, trailing):
      """
 
</s> remove         content = re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', content)
 </s> add         content = re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', unicode(content))
  
  from django.utils.html import escape
  from django.utils.safestring import mark_safe
  from rest_framework.compat import apply_markdown


  import re
  
  
  def remove_trailing_string(content, trailing):
      """
keep keep keep keep replace replace keep keep keep keep keep
 Evaluate content before passing to regex.sub

Issue #1708 
rest_framework/utils/formatting.py