%%
%% This is file `lwarp-fvextra.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `fvextra')
%% This is a generated file.
%% Copyright 2016-2022 Brian Dunn
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackagePass{fvextra}[2023/11/28]
\define@booleankey{FV}{obeytabs}%
  {\let\FV@ObeyTabsInit\relax}%     lwarp
  {\let\FV@ObeyTabsInit\relax}

\define@key{FV}{tabcolor}{}%

\define@booleankey{FV}{showtabs}%
 {\def\FV@TabChar{\FV@TabColor{\FancyVerbTab}}}%
 {\let\FV@TabChar\relax}

\newbool{LWR@FV@breaklines}

\define@booleankey{FV}{breaklines}%
  {\boolfalse{FV@breaklines}%
    \booltrue{LWR@FV@breaklines}%                           lwarp
    \let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}%   lwarp
  {\boolfalse{FV@breaklines}%
    \boolfalse{LWR@FV@breaklines}%                          lwarp
    \let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}

\define@key{FV}{breakanywheresymbolpre}{\def\FancyVerbBreakAnywhereSymbolPre{}}
\fvset{breakanywheresymbolpre={}}

\define@key{FV}{breakanywheresymbolpost}{\def\FancyVerbBreakAnywhereSymbolPost{}}
\fvset{breakanywheresymbolpost={}}

\define@key{FV}{breakbeforesymbolpre}{\def\FancyVerbBreakBeforeSymbolPre{}}
\fvset{breakbeforesymbolpre={}}

\define@key{FV}{breakbeforesymbolpost}{\def\FancyVerbBreakBeforeSymbolPost{}}
\fvset{breakbeforesymbolpost={}}

\define@key{FV}{breakaftersymbolpre}{\def\FancyVerbBreakAfterSymbolPre{}}
\fvset{breakaftersymbolpre={}}

\define@key{FV}{breakaftersymbolpost}{\def\FancyVerbBreakAfterSymbolPost{}}
\fvset{breakaftersymbolpost={}}

\define@key{FV}{breaksymbolleft}{\def\FancyVerbBreakSymbolLeft{}}

\define@key{FV}{breaksymbol}{\fvset{breaksymbolleft={}}}

\fvset{breaksymbolleft={}}

\define@key{FV}{breaksymbolright}{\def\FancyVerbBreakSymbolRight{}}
\fvset{breaksymbolright={}}

\def\FV@DefFVSpace{%
  \ifbool{FV@showspaces}%
     {%
        \def\FV@Space{%
            \FV@SpaceColor{\FancyVerbSpace}%
            \allowbreak%
        }%
     }%
    {\def\FV@Space{\nobreakspace\allowbreak}}%
}

\ifxetexorluatex
\def\FancyVerbSpace{\textvisiblespace}
\else
\@ifundefined{verbvisiblespace}%
  {%
    \@ifundefined{textvisiblespace}%
    {\begingroup\catcode`\ =12 \gdef\FancyVerbSpace{\tt }\endgroup}
    {\def\FancyVerbSpace{\textvisiblespace}}
  }%
  {\def\FancyVerbSpace{\verbvisiblespace}}
\fi

\VerifyCommand[lwarp][fvextra]{\FV@ListProcessLine@NoBreak}{935C1C5101F15E02B916295A66862714}

\def\FV@ListProcessLine@NoBreak#1{%
      \FV@LeftListNumber%
      \FV@LeftListFrame%
      \FancyVerbFormatLine{%
        \FancyVerbHighlightLine{%
          \FV@ObeyTabs{\FancyVerbFormatText{#1}}}}%\hss
      \FV@RightListFrame%
      \FV@RightListNumber%
\null\par%                   lwarp
}
\newcommand*{\LWR@FV@linethensep}{%
    \ifbool{LWR@FV@breaklines}%
        {\theFancyVerbLine\kern\FV@NumberSep}%
        {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}%
}

\newcommand*{\LWR@FV@septhenline}{%
    \ifbool{LWR@FV@breaklines}%
        {\kern\FV@NumberSep\theFancyVerbLine}%
        {\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}%
}

\VerifyCommand[lwarp][fvextra]{\FV@Numbers@left}{57A16473A8AA4214529F6BABEC435311}

\xpatchcmd{\FV@Numbers@left}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@left A}}

\xpatchcmd{\FV@Numbers@left}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@left B}}

\xpatchcmd{\FV@Numbers@left}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@left C}}

\VerifyCommand[lwarp][fvextra]{\FV@Numbers@right}{6D0F98326BCB22695874D94BEC12E32F}

\xpatchcmd{\FV@Numbers@right}%
    {\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
    {\LWR@FV@septhenline}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@right A}}

\xpatchcmd{\FV@Numbers@right}%
    {\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
    {\LWR@FV@septhenline}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@right B}}

\xpatchcmd{\FV@Numbers@right}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@right C}}

\VerifyCommand[lwarp][fvextra]{\FV@Numbers@both}{C349DC2B800D5DD085FFB7620A6289EA}

\xpatchcmd{\FV@Numbers@both}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@both A}}

\xpatchcmd{\FV@Numbers@both}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@both B}}

\xpatchcmd{\FV@Numbers@both}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@both C}}

\xpatchcmd{\FV@Numbers@both}%
    {\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
    {\LWR@FV@septhenline}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@both D}}

\xpatchcmd{\FV@Numbers@both}%
    {\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
    {\LWR@FV@septhenline}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@both E}}

\xpatchcmd{\FV@Numbers@both}%
    {\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
    {\LWR@FV@linethensep}
    {}
    {\LWR@patcherror{fvextra}{FV@Numbers@both F}}

\VerifyCommand[lwarp][fvextra]{\FVC@SaveVerb@Extra@ii}{BCE88217BA577F70BAC8158E110E404C}

\def\FVC@SaveVerb@Extra@ii#1#2#3{%
  \global\let\FV@AfterSave\FancyVerbAfterSave
  \endgroup
   \@namedef{FV@SV@#1}{\LWR@HTMLsanitize@use@tmpb{#3}}%     lwarp
  \@namedef{FV@SVRaw@#1}{\LWR@HTMLsanitize@use@tmpb{#2}}%   lwarp
  \FV@AfterSave}%

\VerifyCommand[lwarp][fvextra]{\FV@UseVerb@Extra}{8B4DAB7A789CAB11394A35D2BA864FE4}

\def\FV@UseVerb@Extra#1{%
    \ifbool{LWR@verbtags}%              lwarp
        {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}%  lwarp
        {}%                             lwarp
  \ifFV@breaklines
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
  {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
  {\mbox{#1}}%
    \ifbool{LWR@verbtags}%              lwarp
        {\LWR@htmltag{/span}}%          lwarp
        {}%                             lwarp
  \endgroup}

\VerifyCommand[lwarp][fvextra]{\FVC@Verb@Extra@ii}{8B4DAB7A789CAB11394A35D2BA864FE4}

\def\FVC@Verb@Extra@ii#1{%
    \def\tmpb{#1}%                                                  lwarp
    \ifbool{LWR@verbtags}%              lwarp
        {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}%  lwarp
        {}%                                             lwarp
    \LWR@HTMLsanitize@tmpb%                             lwarp
  \ifFV@breaklines
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
  {\FV@InsertBreaks{\FancyVerbFormatInline}{\tmpb}}%    lwarp
  {\mbox{\tmpb}}%                                       lwarp
    \ifbool{LWR@verbtags}%              lwarp
        {\LWR@htmltag{/span}}%          lwarp
        {}%                             lwarp
  \endgroup}

\VerifyCommand[lwarp][fvextra]{\FVC@EscVerb@ii}{8B4DAB7A789CAB11394A35D2BA864FE4}

\def\FVC@EscVerb@ii#1{%
  \def\tmpb{#1}%                        lwarp
    \ifbool{LWR@verbtags}%              lwarp
        {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}%  lwarp
        {}%                             lwarp
  \LWR@HTMLsanitize@tmpb%               lwarp
  \ifFV@breaklines
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
  {\FV@InsertBreaks{\FancyVerbFormatInline}{\tmpb}}%    lwarp
  {\mbox{\tmpb}}%                                       lwarp
    \ifbool{LWR@verbtags}%              lwarp
        {\LWR@htmltag{/span}}%          lwarp
        {}%                             lwarp
  \endgroup}

\VerifyCommand[lwarp][fvextra]{\FVB@VerbatimWrite}{B092E8AB57DB2ABBA815BC39DB5256DC}

\xpatchcmd{\FVB@VerbatimWrite}
    {\FV@Scan}
    {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
    {}
    {\LWR@patcherror{fvextra}{FVB@VerbatimWrite}}

\VerifyCommand[lwarp][fvextra]{\FVB@VerbatimBuffer}{048525348EC4D60E258FD5DD74434BB1}

\xpatchcmd{\FVB@VerbatimBuffer}
    {\FV@Scan}
    {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
    {}
    {\LWR@patcherror{fvextra}{FVB@VerbatimBuffer}}

\VerifyCommand[lwarp][fvextra]{\VerbatimInsertBuffer}{4582BD54720B56AD050042DD9FC0E289}

\renewcommand{\VerbatimInsertBuffer}[1][]{%
  \begingroup
  \def\FV@KeyValues{#1}%
  \def\FV@Scan{%
    \FV@CatCodes
    \xdef\FV@EnvironName{Verbatim}%
    \ifnum\expandafter\value\expandafter{\FV@bufferlengthname}=\z@\relax
      \PackageError{fvextra}%
       {Buffer length counter \FV@bufferlengthname\space is invalid or zero}%
       {}%
      \let\FV@GetLine\relax
    \fi
    \FV@GetLine}%
  \let\FV@CheckScan\relax
  \setcounter{FancyVerbBufferIndex}{1}%
  \def\VerbatimInsertBuffer@def@FV@Line##1{%
    \FVExtraRetokenizeVArg{\def\FV@Line}{}{##1}%
    \LetLtxMacro\tmpb\FV@Line%      lwarp
    \LWR@HTMLsanitize@tmpb%         lwarp
    \LetLtxMacro\FV@Line\tmpb%      lwarp
  }%
  \def\FancyVerbGetLine{%
    \ifnum\value{FancyVerbBufferIndex}>%
        \expandafter\value\expandafter{\FV@bufferlengthname}\relax
      \global\let\FV@EnvironName\relax
      \let\next\relax
    \else
      \ifcsname \FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
        \expandafter\let\expandafter\FV@Line@Buffer
          \csname\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
        \expandafter\VerbatimInsertBuffer@def@FV@Line\expandafter{\FV@Line@Buffer}%
        \def\next{\FV@PreProcessLine\FV@GetLine}%
        \stepcounter{FancyVerbBufferIndex}%
      \else
        \def\next{%
          \PackageError{fvextra}%
           {Buffer with line macro named
            "\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}" does not exist}%
           {Check bufferlinename, bufferlengthname, and globalbuffer settings}%
        }%
      \fi
    \fi
    \next}%
  \FVB@Verbatim
  \FVE@Verbatim
  \setcounter{FancyVerbBufferIndex}{0}%
  \endgroup}


\endinput
%%
%% End of file `lwarp-fvextra.sty'.
