| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/__pycache__/ |
Upload File : |
�
��?� � �: � d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZddlZddl m
Z
ddl mZ ddlm
Z
dd lmZ ddlZd
ZdZdZd
ZdZd� Z G d� de� � Zd� Zd� Zd� Zd� Z G d� d ej ej e� � � � Z G d� de� � Z d� Z!dS )z6The Calliope command help document markdown generator.� )�absolute_import)�division)�unicode_literalsN)�base)�
usage_text)�
properties)�
console_io�N � � � c � � t j dd| � � } t j d| � � }|r=|� d� � � � � |� d� � z } | � 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 ) sn � �
�F�1�2�w�?�?�'�
�(�'��
1�
1�%�
� 6��k�k�!�n�n�"�"�$�$�u�{�{�1�~�~�5�G� ���� � �� c �$ � e Zd ZdZd� Zd� Zd� ZdS )�ExampleCommandLineSplitterz�Example command line splitter.
Attributes:
max_index: int, The max index to check in line.
quote_char: str, The current quote char for quotes split across lines.
quote_index: int, The index of quote_char in line or 0 if in previous line.
c �Z � t t z
t z
| _ d | _ d| _ d S )Nr )�_SPLIT�_SECTION_INDENT�
_FIRST_INDENT�
_max_index�_quote_char�_quote_index��selfs r �__init__z#ExampleCommandLineSplitter.__init__I s) � ���.��>�D�O��D���D���r c �l � d}d}d}d}d}d}|| j k r�|| }|dz
}|| j k rd| _ nt| j r|dk r|dz
}| j }nZ|dv r|| _ || _ d}nE|dk r|dz
}n9|| j k r.|dk r|| dk rd }|}n|rd}n|}n|d
v r|}n|dk rd}|| j k ��d} t }
|r
|}t }
n|r|}|d
k rd} n|dz
}n|r|}n| j }|| j k rd| _ nd| _ t
t z
|
z
| _ |d|� | d|
z g||d� fS )a� Splits line into before and after, len(before) < self._max_index.
Args:
line: str, The line to split.
Returns:
(before, after)
The line split into two parts. <before> is a list of strings that forms
the first line of the split and <after> is a string containing the
remainder of the line to split. The display width of <before> is
< self._max_index. <before> contains the separator chars, including a
newline.
r NFr � ��"�'�\�-T)�,�;�/�|�=z\
r, �
)r"