관리-도구
편집 파일: genshi.cpython-38.pyc
U ��.e� � @ sL d dl mZmZmZ d dlmZmZ d dlmZmZm Z m Z mZ dd� ZdS )� )�absolute_import�division�unicode_literals)�QName�Attrs)�START�END�TEXT�COMMENT�DOCTYPEc c sR g }| D �]*}|d }|dkr.|� |d � n|rHtd�|�dfV g }|dkr�|d rnd|d |d f }n|d }td d� |d �� D ��}tt|�|fdfV |dkr�d }|d kr�|d r�d|d |d f }n|d }tt|�dfV q|dk�rt|d dfV q|dkrt |d |d |d fdfV qq|�rNtd�|�dfV dS )z�Convert a tree to a genshi tree :arg walker: the treewalker to use to walk the tree to convert it :returns: generator of genshi nodes �type)Z CharactersZSpaceCharacters�data� )N���r )ZStartTag�EmptyTag� namespace�{%s}%s�namec S s4 g | ],\}}t |d dk r"d| n|d �|f�qS )r Nr � )r )�.0�attr�value� r �L/usr/lib/python3.8/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py� <listcomp> s �zto_genshi.<locals>.<listcomp>r ZEndTag�CommentZDoctypeZpublicIdZsystemIdN) �appendr �joinr �itemsr r r r r )Zwalker�text�tokenr r Zattrsr r r � to_genshi sD � ��r! N) Z __future__r r r Zgenshi.corer r r r r r r r! r r r r �<module> s