
from django.template import Library
from template_utils.markup import markup_filter

def apply_markup(value):
    """
    Applies text-to-HTML conversion.

    """
    return markup_filter(value)

register = Library()
register.filter(apply_markup)


from django.template import Library
from template_utils.markup import markup_filter

def apply_markup(value, arg=None):
    """
    Applies text-to-HTML conversion.

    Takes an optional argument to specify the name of a filter to use.

    """
    if arg is not None:
        return markup_filter(value, filter_name=arg)
    return markup_filter(value)

register = Library()
register.filter(apply_markup)

Make markup template filter take filter_name argument
Make markup template filter take filter_name argument

  
  from django.template import Library
  from template_utils.markup import markup_filter
  
- def apply_markup(value):
+ def apply_markup(value, arg=None):
      """
      Applies text-to-HTML conversion.
  
+     Takes an optional argument to specify the name of a filter to use.
+ 
      """
+     if arg is not None:
+         return markup_filter(value, filter_name=arg)
      return markup_filter(value)
  
  register = Library()
  register.filter(apply_markup)
  
Make markup template filter take filter_name argument
## Code Before:

from django.template import Library
from template_utils.markup import markup_filter

def apply_markup(value):
    """
    Applies text-to-HTML conversion.

    """
    return markup_filter(value)

register = Library()
register.filter(apply_markup)

## Instruction:
Make markup template filter take filter_name argument
## Code After:

from django.template import Library
from template_utils.markup import markup_filter

def apply_markup(value, arg=None):
    """
    Applies text-to-HTML conversion.

    Takes an optional argument to specify the name of a filter to use.

    """
    if arg is not None:
        return markup_filter(value, filter_name=arg)
    return markup_filter(value)

register = Library()
register.filter(apply_markup)
