Skip to content

Commit

Permalink
#13 textgreater and textless
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jun 29, 2023
1 parent 9e714c2 commit 31b54e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion naive-ebnf.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
% \begin{ebnf}[1.5in]
% <VeryLongVariable> := <X> | <Y> \\
% <X> := "X" 'EOL' \\
% <Y> := "Y" \\
% <Y> := "Y" ">" "<" \\
% \end{ebnf}
% \end{document}
% \end{docshot}
Expand Down Expand Up @@ -317,6 +317,9 @@
\NewDocumentEnvironment{ebnf}{O{4em}+b}
{\tl_set:Nn\l__ebnf_tmp_tl{#2}}
{%
\regex_replace_all:nnN { ([^\ ])< } {\1\\textless{}} \l__ebnf_tmp_tl%
\regex_replace_all:nnN { >([^\ ]) } {\\textgreater{}\1} \l__ebnf_tmp_tl%
%
\regex_replace_all:nnN { \{\ (.+?)\ \} }%
{\c{ebnf@repetition}{\1}} \l__ebnf_tmp_tl%
\regex_replace_all:nnN { \(\ (.+?)\ \) }%
Expand Down

0 comments on commit 31b54e8

Please sign in to comment.