Files
ServerSync/lib/pygments/formatters/__pycache__/rtf.cpython-314.pyc

159 lines
14 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
<00> <0C>i<EFBFBD>.<00><00>b<00>Rt^RIHt^RIHt^RIHt^RIHtH t H
t
H t R.t !RR]4t R#)z<>
pygments.formatters.rtf
~~~~~~~~~~~~~~~~~~~~~~~
A formatter that generates RTF files.
:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
)<01> OrderedDict)<01> Formatter)<01>_ansimap)<04> get_bool_opt<70> get_int_opt<70> get_list_opt<70> surrogatepair<69> RtfFormatterc<00><>a<00>]tRt^toRtRtR.tR.tRtRt Rt
] R4t R t R
t]R 4t]R 4t]R 4tRtRtVtR#)r a<>
Format tokens as RTF markup. This formatter automatically outputs full RTF
documents with color information and other useful stuff. Perfect for Copy and
Paste into Microsoft(R) Word(R) documents.
Please note that ``encoding`` and ``outencoding`` options are ignored.
The RTF format is ASCII natively, but handles unicode characters correctly
thanks to escape sequences.
.. versionadded:: 0.6
Additional options accepted:
`style`
The style to use, can be a string or a Style subclass (default:
``'default'``).
`fontface`
The used font family, for example ``Bitstream Vera Sans``. Defaults to
some generic font which is supposed to have fixed width.
`fontsize`
Size of the font used. Size is specified in half points. The
default is 24 half-points, giving a size 12 font.
.. versionadded:: 2.0
`linenos`
Turn on line numbering (default: ``False``).
.. versionadded:: 2.18
`lineno_fontsize`
Font size for line numbers. Size is specified in half points
(default: `fontsize`).
.. versionadded:: 2.18
`lineno_padding`
Number of spaces between the (inline) line numbers and the
source code (default: ``2``).
.. versionadded:: 2.18
`linenostart`
The line number for the first line (default: ``1``).
.. versionadded:: 2.18
`linenostep`
If set to a number n > 1, only every nth line number is printed.
.. versionadded:: 2.18
`lineno_color`
Color for line numbers specified as a hex triplet, e.g. ``'5e5e5e'``.
Defaults to the style's line number color if it is a hex triplet,
otherwise ansi bright black.
.. versionadded:: 2.18
`hl_lines`
Specify a list of lines to be highlighted, as line numbers separated by
spaces, e.g. ``'3 7 8'``. The line numbers are relative to the input
(i.e. the first line is line 1) unless `hl_linenostart` is set.
.. versionadded:: 2.18
`hl_color`
Color for highlighting the lines specified in `hl_lines`, specified as
a hex triplet (default: style's `highlight_color`).
.. versionadded:: 2.18
`hl_linenostart`
If set to ``True`` line numbers in `hl_lines` are specified
relative to `linenostart` (default ``False``).
.. versionadded:: 2.18
<EFBFBD>RTF<54>rtfz*.rtfc <0C><<00>\P!V3/VBVPR4;'gRVn\ VR^4Vn\ VRR4Vn\ VRVP
4Vn\ VR^4Vn \\ VR^44Vn \\ VR ^44Vn \ VR
R4Vn VPR R4VnVP'gVPP Vn.Vn\%VR .4FUp\'V4pVP'dW P,
^,pVP"P)V4KW VPR R4VnVP,'gJVPP.R8Xd\0R,VnMVPP.VnVP34VnR# \*dK<>i;i)aR
Additional options accepted:
``fontface``
Name of the font used. Could for example be ``'Courier New'``
to further specify the default which is ``'\fmodern'``. The RTF
specification claims that ``\fmodern`` are "Fixed-pitch serif
and sans serif fonts". Hope every RTF implementation thinks
the same about modern...
<EFBFBD>fontface<63><00>fontsize<7A>linenosF<73>lineno_fontsize<7A>lineno_padding<6E> linenostart<72>
linenostep<EFBFBD>hl_linenostart<72>hl_color<6F>hl_lines<65> lineno_color<6F>inherit<69>ansibrightblackN)r<00>__init__<5F>getrrrrrrr<00>absrrrr<00>style<6C>highlight_colorrr<00>int<6E>append<6E>
ValueErrorr<00>line_number_colorr<00>_create_color_mapping<6E> color_mapping)<03>self<6C>options<6E>linenos&, <20>>/tmp/pip-target-qd_sq_1j/lib/python/pygments/formatters/rtf.pyr<00>RtfFormatter.__init__is<><00><00> <12><1A><1A>4<EFBFBD>+<2B>7<EFBFBD>+<2B><1F> <0B> <0B>J<EFBFBD>/<2F>5<>5<>2<EFBFBD><04> <0A>#<23>G<EFBFBD>Z<EFBFBD><11>;<3B><04> <0A>#<23>G<EFBFBD>Y<EFBFBD><05>><3E><04> <0C>*<2A>7<EFBFBD>4E<34>+/<2F>=<3D>=<3D> :<3A><04><1C>)<29>'<27>3C<33>Q<EFBFBD>G<><04><1B><1E>{<7B>7<EFBFBD>M<EFBFBD>1<EFBFBD>E<>F<><04><18><1D>k<EFBFBD>'<27><<3C><11>C<>D<><04><0F>*<2A>7<EFBFBD>4D<34>e<EFBFBD>L<><04><1B><1F> <0B> <0B>J<EFBFBD><02>3<><04> <0A><13>}<7D>}<7D>}<7D> <20>J<EFBFBD>J<EFBFBD>6<>6<>D<EFBFBD>M<EFBFBD><1A><04> <0A>"<22>7<EFBFBD>J<EFBFBD><02>;<3B>F<EFBFBD> <15><1C>V<EFBFBD><1B><06><17>&<26>&<26>&<26>#<23>&6<>&6<>6<><11>:<3A>F<EFBFBD><14> <0A> <0A>$<24>$<24>V<EFBFBD>,<2C> <<3C>$<24>K<EFBFBD>K<EFBFBD><0E><02>;<3B><04><19><13> <20> <20> <20><14>
<EFBFBD>
<EFBFBD>,<2C>,<2C> <09>9<>%-<2D>-><3E>$?<3F><04>!<21>%)<29>J<EFBFBD>J<EFBFBD>$@<40>$@<40><04>!<21>!<21>7<>7<>9<><04><1A><><1E> <15><14> <15>s<00>.AH <02> H<05>Hc<08>f<00>VPRR4PRR4PRR4#)<06>\z\\<5C>{z\{<7B>}z\})<01>replace)r'<00>texts&&r*<00>_escape<70>RtfFormatter._escape<70>s-<00><00><13>|<7C>|<7C>D<EFBFBD>&<26>)<29><1B>G<EFBFBD>C<EFBFBD><15>'<27><1B>G<EFBFBD>C<EFBFBD><15>'<27> (<28>c<08><><00>V'gR#VPV4p.pVF<>p\V4pV^<5E>8dVP\V44K1^<5E>Tu;8:dR8dMMVPRV,4K]RV8:gKfVPR\ V4,4K<> RP V4P RR4#)rz{\u%d}z {\u%d}{\u%d}<7D>
z\pari)r2<00>ordr"<00>strr<00>joinr0)r'r1<00>buf<75>c<>cns&& r*<00> _escape_text<78>RtfFormatter._escape_text<78>s<><00><00><13><15><14>|<7C>|<7C>D<EFBFBD>!<21><04><10><03><15>A<EFBFBD><14>Q<EFBFBD><16>B<EFBFBD><11>T<EFBFBD>{<7B><13>
<EFBFBD>
<EFBFBD>3<EFBFBD>q<EFBFBD>6<EFBFBD>"<22><16>2<EFBFBD>'<27><15>'<27><13>
<EFBFBD>
<EFBFBD>9<EFBFBD>r<EFBFBD>><3E>*<2A><17>B<EFBFBD><1D><14>
<EFBFBD>
<EFBFBD>+<2B>m<EFBFBD>B<EFBFBD>.?<3F>?<3F>@<40><16><12>w<EFBFBD>w<EFBFBD>s<EFBFBD>|<7C>#<23>#<23>D<EFBFBD>'<27>2<>2r4c<08><><00>V^,R8Xd
VR,pR\VR,^4\VR,^4\VR,^43,#)<07><00>#:<3A>NNz\red%d\green%d\blue%d;:r@<00>N:rC<00>N:rD<00>N)r!)<01> hex_colors&r*<00>hex_to_rtf_color<6F>RtfFormatter.hex_to_rtf_color<6F>sS<00><00> <14>Q<EFBFBD><<3C>3<EFBFBD> <1E>!<21>"<22> <0A>I<EFBFBD>*<2A><1B>I<EFBFBD>c<EFBFBD>N<EFBFBD>B<EFBFBD>/<2F><1B>I<EFBFBD>c<EFBFBD>N<EFBFBD>B<EFBFBD>/<2F><1B>I<EFBFBD>c<EFBFBD>N<EFBFBD>B<EFBFBD>/<2F>.<16><16> r4c# <0C><>"<00>VFgwr#VR8XdW#3x<00>KRV9dIVPR4pVRRFpW%R,3x<00>K VR,'dW$R,3x<00>K`KbW#3x<00>Ki R#5i)z<>
Split tokens containing newline characters into multiple token
each representing a line of the input file. Needed for numbering
lines of e.g. multiline comments.
r6N<><4E><EFBFBD><EFBFBD><EFBFBD>)<01>split)r'<00> tokensource<63>ttype<70>value<75>lines<65>lines&& r*<00>_split_tokens_on_newlines<65>&RtfFormatter._split_tokens_on_newlines<65>sy<00><00><00> (<28>L<EFBFBD>E<EFBFBD><14><04>}<7D><1C>n<EFBFBD>$<24><15><15><1D><1D> <0B> <0B>D<EFBFBD>)<29><05>!<21>#<23>2<EFBFBD>J<EFBFBD>D<EFBFBD> <20>t<EFBFBD>)<29>,<2C>,<2C>'<27><18><12>9<EFBFBD>9<EFBFBD> <20><02>)<29>,<2C>,<2C><1D><1D>n<EFBFBD>$<24>(<28>s<00>A0A2c <0C>l<00>\4p^pVP'dW!VP&V^, pVP'dW!VP&V^, pVP
FEwr4VR,VR,VR,3F"pV'gK WQ9gKW!V&V^, pK$ KG V#)zN
Create a mapping of style hex colors to index/offset in
the RTF color table.
<EFBFBD>color<6F>bgcolor<6F>border)rrrrrr)r'r&<00>offset<65>_rrTs& r*r%<00>"RtfFormatter._create_color_mapping<6E>s<><00><00>
$<24> <0A> <0A><12><06> <0F><<3C><<3C><<3C>/5<>$<24>+<2B>+<2B> ,<2C> <12>a<EFBFBD>K<EFBFBD>F<EFBFBD> <0F>=<3D>=<3D>=<3D>+1<>$<24>-<2D>-<2D> (<28> <12>a<EFBFBD>K<EFBFBD>F<EFBFBD><1C>
<EFBFBD>
<EFBFBD>H<EFBFBD>A<EFBFBD><1E>w<EFBFBD><1E><15>y<EFBFBD>)9<>5<EFBFBD><18>?<3F>J<><05><18>5<EFBFBD>U<EFBFBD>7<>+1<>%<25>(<28><1A>a<EFBFBD>K<EFBFBD>F<EFBFBD>K<01>#<23> <1D>r4c<08>F<00>VPVP8wdJRPVPVPVP,RVP
,4#RPVPVP,RVP
,4#)z{{\fs{} \cf{} %s{}}}<7D> z{{\cf{} %s{}}})rr<00>formatr&rr<00>r's&r*<00>_lineno_template<74>RtfFormatter._lineno_template<74>s<><00><00> <0F> <1F> <1F>4<EFBFBD>=<3D>=<3D> 0<>+<2B>2<>2<>4<EFBFBD>3G<33>3G<33><1E>,<2C>,<2C>T<EFBFBD>-><3E>-><3E>?<3F><1D><04> 3<> 3<>3<>5<> 5<>!<21>'<27>'<27><04>(:<3A>(:<3A>4<EFBFBD>;L<>;L<>(M<><19>D<EFBFBD>/<2F>/<2F>/<2F>1<> 1r4c<08>D<00>RVPVP, R2#)z {\highlightr[)r&rr]s&r*<00> _hl_open_str<74>RtfFormatter._hl_open_str<74>s!<00><00><1E>t<EFBFBD>1<>1<>$<24>-<2D>-<2D>@<40>A<><11>C<>Cr4c<08>,<00>.pTPRVP;'d+RVPVP4,;'gR,4VPR4VPP 4F%wr#VPVP V44K' VPR4VPR4VP 'd#VPRVP ,4VPR4V#)z?{\rtf1\ansi\uc0\deff0{\fonttbl{\f0\fmodern\fprq1\fcharset0%s;}}r[rz {\colortbl;r/z\f0\sa0z\fs%dz \dntblnsbdb)r"rr2r&<00>itemsrGr)r'rOrTrXs& r*<00> _rtf_header<65>RtfFormatter._rtf_header<65>s<><00><00><12><05> <0A> <0C> <0C>G<01><1C> <0A> <0A>6<>6<>#<23><1E>,<2C>,<2C>t<EFBFBD>}<7D>}<7D>5<>+6<><<3C><<3C>9;<3B>=<3D> ><3E> <0E> <0C> <0C>^<5E>$<24><1C>*<2A>*<2A>0<>0<>2<>H<EFBFBD>E<EFBFBD> <11>L<EFBFBD>L<EFBFBD><14>.<2E>.<2E>u<EFBFBD>5<> 6<>3<> <0A> <0C> <0C>S<EFBFBD><19> <0E> <0C> <0C>[<5B>!<21> <0F>=<3D>=<3D>=<3D> <11>L<EFBFBD>L<EFBFBD><18>D<EFBFBD>M<EFBFBD>M<EFBFBD>1<> 2<>
<0E> <0C> <0C>^<5E>$<24><14> r4c<08><00>VPFpVPVR,4K VPV4pVP'dq^p.pVF9wrgVP Wg34VP R4'gK0V^, pK; \ \W@P,^,
44pTp^p Rp
VEF$wrgV
'd,W<>P9dVPVP4V
'd<>VP'd<>W<>P,
^,VP,^8Xd5W<>P,^,
p \V 4PX4p MRPX4p VPVPV ,4VPPV4'g!VP 'dVP pKAVPP#V4p .pV R,'d1VP RVP$V R,,,4V R,'d1VP RVP$V R,,,4V R,'dVP R4V R ,'dVP R
4V R ,'dVP R 4V R ,'d1VP RVP$V R ,,,4RP'V4pV'dVPRV R24VPVP)V44V'dVPR4Rp
VP R4'gEK<>W<>P9dVPR4VPR4Rp
V ^, p EK' VPR4R#)r6TrrUz\cb%drTz\cf%d<>boldz\b<>italicz\i<> underlinez\ulrVz\chbrdr\chcfpat%dr.r[r/Fz}
N)re<00>writerQrr"<00>endswith<74>lenr8rrrar<00>rjustr^r<00> styles_token<65>parent<6E>style_for_tokenr&r9r=)r'rL<00>outfilerP<00>
line_count<EFBFBD>tokensrMrN<00> linenos_widthr)<00>start_new_line<6E>current_lineno<6E>
lineno_strrr:<00>starts&&& r*<00>format_unencoded<65>RtfFormatter.format_unencodeds<><00><00><18>$<24>$<24>D<EFBFBD> <13>M<EFBFBD>M<EFBFBD>$<24><14>+<2B> &<26>%<25><1B>4<>4<>[<5B>A<> <0B> <10><<3C><<3C><<3C><1A>J<EFBFBD><17>F<EFBFBD> +<2B> <0C><05><16> <0A> <0A>u<EFBFBD>n<EFBFBD>-<2D><18>><3E>><3E>$<24>'<27>'<27><1E>!<21>O<EFBFBD>J<EFBFBD>!,<2C>  <20><03>J<EFBFBD>/?<3F>/?<3F>$?<3F><01>$A<> B<>C<>M<EFBFBD> <20>K<EFBFBD><13><06><1D><0E>'<27>L<EFBFBD>E<EFBFBD><1D>&<26>M<EFBFBD>M<EFBFBD>"9<><17> <0A> <0A>d<EFBFBD>/<2F>/<2F>0<><1D>$<24>,<2C>,<2C>,<2C><1A>+<2B>+<2B>+<2B>A<EFBFBD>-<2D>t<EFBFBD><EFBFBD><EFBFBD>><3E>!<21>C<>%+<2B>.><3E>.><3E>%><3E><11>%B<>N<EFBFBD>!$<24>^<5E>!4<>!:<3A>!:<3A>=<3D>!I<>J<EFBFBD>!#<23><18><18>-<2D>!8<>J<EFBFBD><17> <0A> <0A>d<EFBFBD>3<>3<>j<EFBFBD>@<40>A<><1A>j<EFBFBD>j<EFBFBD>-<2D>-<2D>e<EFBFBD>4<>4<><15><1C><1C><1C><1D> <0C> <0C><05><18>J<EFBFBD>J<EFBFBD>.<2E>.<2E>u<EFBFBD>5<>E<EFBFBD><14>C<EFBFBD><14>Y<EFBFBD><1F><1F><13>
<EFBFBD>
<EFBFBD>8<EFBFBD>d<EFBFBD>&8<>&8<><15>y<EFBFBD>9I<39>&J<>J<>K<><14>W<EFBFBD>~<7E>~<7E><13>
<EFBFBD>
<EFBFBD>8<EFBFBD>d<EFBFBD>&8<>&8<><15>w<EFBFBD><1E>&H<>H<>I<><14>V<EFBFBD>}<7D>}<7D><13>
<EFBFBD>
<EFBFBD>5<EFBFBD>!<21><14>X<EFBFBD><EFBFBD><EFBFBD><13>
<EFBFBD>
<EFBFBD>5<EFBFBD>!<21><14>[<5B>!<21>!<21><13>
<EFBFBD>
<EFBFBD>6<EFBFBD>"<22><14>X<EFBFBD><EFBFBD><EFBFBD><13>
<EFBFBD>
<EFBFBD>0<><1F>-<2D>-<2D>e<EFBFBD>H<EFBFBD>o<EFBFBD>><3E>?<3F>@<01><16>G<EFBFBD>G<EFBFBD>C<EFBFBD>L<EFBFBD>E<EFBFBD><14><17> <0A> <0A><02>5<EFBFBD>'<27><11>m<EFBFBD>,<2C> <13>M<EFBFBD>M<EFBFBD>$<24>+<2B>+<2B>E<EFBFBD>2<> 3<><14><17> <0A> <0A>c<EFBFBD>"<22>"<22>N<EFBFBD><15>~<7E>~<7E>d<EFBFBD>#<23>#<23><19>]<5D>]<5D>*<2A><1B>M<EFBFBD>M<EFBFBD>#<23>&<26><17> <0A> <0A>d<EFBFBD>#<23>!%<25><0E><16>!<21> <0B><06>](<28>` <10> <0A> <0A>e<EFBFBD>r4) r&rrrrrrrrrrrN)<16>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__<5F>name<6D>aliases<65> filenamesrr2r=<00> staticmethodrGrQr%<00>propertyr^rarerz<00>__static_attributes__<5F>__classdictcell__)<01> __classdict__s@r*r r s<><00><><00><00>O<08>` <11>D<EFBFBD><14>g<EFBFBD>G<EFBFBD><18> <09>I<EFBFBD>0:<3A>d(<28>
3<>0<12><16><12><16>%<25>$<1D>0<0E>1<><0E>1<><0E>D<01><0E>D<01><0E><15><0E><15>4G<1D>Gr4N)r<><00> collectionsr<00>pygments.formatterr<00>pygments.styler<00> pygments.utilrrrr<00>__all__r <00>r4r*<00><module>r<>s3<00><01><04>$<24>(<28>#<23>P<>P<> <1A>
<1A><07>I<1D>9<EFBFBD>Ir4