Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/pygments/formatters/__pycache__/ |
Upload File : |
o ���au � @ sB d Z ddlZddlmZ ddlmZmZ dgZG dd� de�ZdS )z� pygments.formatters.groff ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for groff output. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)� Formatter)�get_bool_opt�get_int_opt�GroffFormatterc @ sX e Zd ZdZdZg d�Zg Zdd� Zdd� Zdd � Z d d� Z dd � Zdd� Zdd� Z dS )r a Format tokens with groff escapes to change their color and font style. .. versionadded:: 2.11 Additional options accepted: `style` The style to use, can be a string or a Style subclass (default: ``'default'``). `monospaced` If set to true, monospace font will be used (default: ``true``). `linenos` If set to true, print the line numbers (default: ``false``). `wrap` Wrap lines to the specified number of characters. Disabled if set to 0 (default: ``0``). �groff)r �troff�roffc K sZ t j| fi |�� t|dd�| _t|dd�| _d| _t|dd�| _d| _i | _ | � � d S )N� monospacedT�linenosFr �wrap)r �__init__r r r �_linenor r �_linelen�styles�_make_styles)�self�options� r �;/usr/lib/python3/dist-packages/pygments/formatters/groff.pyr - s zGroffFormatter.__init__c C s� | j rdnd}| j rdnd}| j rdnd}| jD ]G\}}d }}|d r0|d |d 7 }d | }|d r<||7 }|| }|d rH||7 }|| }|d rX|d|d 7 }d| }||f| j|<