
#*L_c           @  sf   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z d  d l Z d e f d     YZ d S(   i(   t   print_function(   t
   HTMLParser(   t   TemplateAnnotator(   t   escapeNt   HTMLTemplateLabelerc           B  sa   e  Z d  Z i d d 6d d 6Z d   Z d   Z d   Z d   Z d	   Z d
   Z	 d   Z
 RS(   t    s   &quot;t   "s   &apos;t   'c         C  s   t  | |  j  S(   N(   R   t   html_escape_table(   t   selft   text(    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyt   html_escape   s    c      	   C  s  | d k r  t  d d d d  S| d k r t  d d j g  | D]) } | d d	 |  j | d
  d ^ q?  d d d d  S|  j d k r |  j   n  t  d | d d j g  | D]) } | d d	 |  j | d
  d ^ q  d d d d |  _ d  S(   Nt   brs   <br />t   endR   t   links   <link t    i    s   ="i   R   s    />t   <t   >(   t   printt   joinR   t   current_datat   process_data(   R	   t   tagt   attrst   a(    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyt   handle_starttag   s    QYc         C  s/   |  j    t d | d d d d |  _ d  S(   Ns   </R   R   R   (   R   R   R   (   R	   R   (    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyt   handle_endtag#   s    
c         C  s   |  j  | |  _  d  S(   N(   R   (   R	   t   data(    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyt   handle_data-   s    c         C  s   |  j  d | d |  _  d  S(   Nt   &t   ;(   R   (   R	   t   name(    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyt   handle_entityref0   s    c         C  s   |  j  d | d |  _  d  S(   Ns   &#R   (   R   (   R	   R   (    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyt   handle_charref3   s    c         C  sB   |  j  d k r d  St   } | j |  j   } t | d d d  S(   NR   R   (   R   R   t   processR   (   R	   t   tt	   processed(    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyR   6   s
    	(   t   __name__t
   __module__R   R   R   R   R   R   R    R!   R   (    (    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyR      s   
			
			(	   t
   __future__R    R   t   template_annotatorR   t   xml.sax.saxutilsR   t   sysR   (    (    (    sK   /home/www/mlpack.ratml.org/mlpack.org/_src/doxygen/html_template_labeler.pyt   <module>   s
   