File: //lib/google-cloud-sdk/lib/googlecloudsdk/calliope/__pycache__/markdown.cpython-312.pyc
�
���� � �T � d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZddlZddl m
Z
ddl mZ ddlm
Z
dd lmZ dd
lmZ ddlZdZdZd
ZdZd
Z eg d�� Zd� Z G d� de� Zd� Zd� Zd� Zd� Z G d� d ejB ejD e� � Z# G d� de#� Z$d� Z%y)z6The Calliope command help document markdown generator.� )�absolute_import)�division)�unicode_literalsN)�base)�
usage_text)�
properties)�
console_io)�universe_descriptor�N � � � )�gcloudzgcloud alphazgcloud betazgcloud previewc �� � t j dd| � } t j d| � }|r1|j d� j � |j d� z } | j d� S )a� Returns a help doc index line for a capsule line.
The capsule line is a formal imperative sentence, preceded by optional
(RELEASE-TRACK) or [TAG] tags, optionally with markdown attributes. The index
line has no tags, is not capitalized and has no period, period.
Args:
capsule: The capsule line to convert to an index line.
Returns:
The help doc index line for a capsule line.
z(\*?[\[(][A-Z]+[\])]\*? +)*� z([A-Z])([^A-Z].*)� r
�.)�re�sub�match�group�lower�rstrip)�capsuler s �'lib/googlecloudsdk/calliope/markdown.py�_GetIndexFromCapsuler 0 s] � �
�F�F�1�2�w�?�'�
�(�(�'��
1�%�
��k�k�!�n�"�"�$�u�{�{�1�~�5�G� ���� �� c �"