+
    TBi                     J    R t ^ RIt^ RIHt ^ RIHtHt R.t ! R R]4      tR# )z
pygments.formatters.groff
~~~~~~~~~~~~~~~~~~~~~~~~~

Formatter for groff output.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
N)	Formatter)get_bool_optget_int_optGroffFormatterc                   ^   a  ] tR t^t o RtRt. ROt. tR tR t	R t
R tR tR tR	 tR
tV tR# )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``).
groffc                    \         P                  ! V 3/ VB  \        VR R4      V n        \        VRR4      V n        ^ V n        \        VR^ 4      V n        ^ V n        / V n	        V P                  4        R# )
monospacedTlinenosFwrapN)r   __init__r   r	   r
   _linenor   r   _linelenstyles_make_styles)selfoptionss   &,>/usr/lib/python3.14/site-packages/pygments/formatters/groff.pyr   GroffFormatter.__init__-   sf    4+7+&wdC#GY>3	    c                2   V P                   '       d   R MRpV P                   '       d   RMRpV P                   '       d   RMRpV P                   F  w  rER;rgVR,          '       d)   VRP                  VR,          4      ,          pR	V,           pVR
,          '       d   Wb,          pW,           pVR,          '       d   Wc,          pW,           pVR,          '       d)   VRP                  VR,          4      ,          pRV,           pWg3V P                  V&   K  	  R# )z\f[CR]z\f[R]z\f[CB]z\f[B]z\f[CI]z\f[I] colorz\m[{}]z\m[]bolditalicbgcolorz\M[{}]z\M[]N)r	   styleformatr   )r   regularr   r   ttypendefstartends   &       r   r   GroffFormatter._make_styles:   s    #)H OOOy"ooo8::KEEG}}))$w-88mF||mH~~mI))$y/::m!&DKK &r   c                   \        4       pV P                   F*  w  r4VR ,          f   K  VP                  VR ,          4       K,  	  \        V4       F0  pVP	                  RV,           R,           V,           R,           4       K2  	  R# )r   Nz
.defcolor z rgb #
)setr   addsortedwrite)r   outfilecolors_r    r   s   &&    r   _define_colorsGroffFormatter._define_colorsQ   sc    zzGAG}(

4=) " F^EMM,.9EADHI $r   c                    V ;P                   ^,          un         TP                  RV P                   ^8g  ;'       d    R;'       g    RV P                   3,          4       R# )   z%s% 4d r%   r   N)r   r)   )r   r*   s   &&r   _write_linenoGroffFormatter._write_lineno[   sC    i4<<1#4#=#=#C#CT\\"RRSr   c                   \        VP                  R 4      4      pV P                  '       d   RMRpRpW P                  8  d   \	        ^ \
        P                  ! W P                  ,          4      4       FO  pWV P                  ,          WPP                  ,          V P                  ,            pWFR ,           V,           ,          pKQ  	  W P                  ,          pV^ 8  d   WAV) ^,
          R ,          pWpn        V# V P                  V,           V P                  8  d   R V,           V,           pW n        V# TpV ;P                  V,          un        V# )r%   z     r   N)lenrstripr
   r   rangemathfloorr   )r   linelengthspacenewlineichunk	remainders   &&      r   
_wrap_lineGroffFormatter._wrap_line`   s   T[[&'<<<RII1djj)));<=tyy[99TYY)>?DL501 > *I1}
1.. )  ]]V#dii/e|t+G"M
  GMMV#Mr   c                   VP                  R R4      P                  RR4      P                  RR4      P                  RR4      P                  RR	4      pTpV F  p\        V4      \        VP                  4       4      8w  g   K,  VP                  R
4      P                  4       R,          P                  RR4      P	                  4       pVP                  VRVR,          ,           R,           4      pK  	  V# )\z\[u005C].z	\[char46]'z\[u0027]`z\[u0060]~z\[u007E]unicode_escape:r0   NNxu00z\[u])replacer4   encodedecodeupper)r   textcopycharunis   &&   r   _escape_charsGroffFormatter._escape_charsw   s    ||D+.GC.GD+.GC-GC-	 	
 D4yC..kk"23VXb"WS%(UW  ||D&3r7*:S*@A  r   c           	     v   V P                  V4       VP                  R 4       V P                  '       d   V P                  V4       V EF[  w  r4W0P                  9  d   VP
                  pK  V P                  V,          w  rVVP                  R4       EF  pV P                  ^ 8  d   V P                  V4      pV'       dS   V'       dK   V P                  VP                  R4      4      pVR8w  d#   VP                  RP                  WXV34      4       M/VP                  V P                  VP                  R4      4      4       VP                  R4      '       g   K  V P                  '       d   V P                  V4       ^ V n        K  VP                  R4       ^ V n        EK  	  EK^  	  VP                  R4       R# )z.nf
\f[CR]
Tr%   r   z
.fiN)r-   r)   r
   r1   r   parent
splitlinesr   r@   rT   r5   joinendswithr   )	r   tokensourcer*   r   valuer!   r"   r9   rP   s	   &&&      r   format_unencodedGroffFormatter.format_unencoded   s?   G$&'<<<w''LE{{*U+JE((.99q=??40DS--dkk$.?@DrzbgguC.@&ABMM$"4"4T[[5F"GH==&&|||**73()d+()# / (0 	gr   )r   r   r
   r	   r   r   N)r   troffroff)__name__
__module____qualname____firstlineno____doc__namealiases	filenamesr   r   r-   r1   r@   rT   r]   __static_attributes____classdictcell__)__classdict__s   @r   r   r      sE     , D&GI
,.JT
.&   r   )	re   r7   pygments.formatterr   pygments.utilr   r   __all__r    r   r   <module>rp      s+     ( 3
XY Xr   