
     h	                     >    d dl mZ d dlmZ d dlmZ  G d de      Zy)    )nodes)admonitionlabels)HTML5Translatorc                   6     e Zd ZdZdgZddZd Z fdZ xZS )BotoHTML5TranslatorzEExtension of Sphinx's ``HTML5Translator`` for Botocore documentation.z
[REQUIRED]c                     | j                   j                  | j                  |dd|z                |r)dt        |    d}| j                   j                  |       yy)z;Uses the h3 tag for admonition titles instead of the p tag.divzadmonition )CLASSz<h3 class='admonition-title'> z</h3>N)bodyappendstarttagr   )selfnodenametitles       t/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/botocore/docs/translator.pyvisit_admonitionz$BotoHTML5Translator.visit_admonition   sa    		MM$md.BMD	
 01A$1G0HN  IIU#	     c                    t        |      dk(  xrv t        |d   t        j                        xrW t        |d         dk(  xrD t        |d   d   t        j                        xr" |d   d   j                         | j                  vS )zDetermines if a node is an implicit heading.

        An implicit heading is represented by a paragraph node whose only
        child is a strong node with text that isnt in `IGNORE_IMPLICIT_HEADINGS`.
           r   )len
isinstancer   strongTextastextIGNORE_IMPLICIT_HEADINGS)r   r   s     r   is_implicit_headingz'BotoHTML5Translator.is_implicit_heading$   s     IN I47ELL1IDG!I 471:uzz2I Q
!!#4+H+HH	
r   c                     | j                  |      r7|d   d   }| j                  j                  d| d       t        j                  t
        |   |       y)zVisit a paragraph HTML element.

        Replaces implicit headings with an h3 tag and defers to default
        behavior for normal paragraph elements.
        r   z<h3>z</h3>
N)r   r   r   r   SkipNodesupervisit_paragraph)r   r   text	__class__s      r   r!   z#BotoHTML5Translator.visit_paragraph2   sR     ##D)71:DIItD612.. G#D)r   ) )	__name__
__module____qualname____doc__r   r   r   r!   __classcell__)r#   s   @r   r   r      s'    O 	 	$
* *r   r   N)docutilsr   sphinx.localer   sphinx.writers.html5r   SphinxHTML5Translatorr    r   r   <module>r/      s     * I,*/ ,*r   