I want to let \url breaks on hyphens '-'. url package has hyphens option but if there are several hyphens in url luatex turnes them to ligatures and latex doesn't.
I can't find how to suppress "--", "---" ligatures creation in url using normal font.
I tried to edit \UrlBreaks, \UrlOrds, \verbatim@nolig@list by adding/removing \do\- but then I get other buggy results.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[hyphens]{url}
% \def\UrlBreaks{\do.\do@\do\\do/\do!\do_\do|\do;\do>\do]%
% \do)\do,\do?\do&\do'\do+\do=\do#%
% \do- % tried to add it here
% }
% original macro from url has two \do\-. Why?
% \def\UrlOrds{\do*
% \do-
% \do~\do'\do"
% \do-
% }%
% it seems that this should do the trick, but it does'nt?
%\makeatletter
%\def\verbatim@nolig@list{\do`\do<\do>\do,\do'\do-}
%\makeatother
\def\UrlFont{}%\ttfamily}
\fboxsep=0pt
\parindent=0pt
\begin{document}
\par\url{-}
\par\url{--}
\par\url{---}
\fbox{\parbox[t]{3cm}{
\par\url{11111111111111-aaaaaaaa}
\par\url{11111111111111--aaaaaaa}
\par\url{11111111111111---aaaaaa}
}}
\end{document}
latex output:
lualatex output:
I use TL2019 and dvilualatex (dvi mode is a requirement)



\usepackage[T1]{fontenc}with lualatex. – Ulrike Fischer Nov 30 '20 at 21:11