I already read the discussions about this error, but nothing helpfull. My MWE
\documentclass{minimal}
\usepackage{xcolor}
\usepackage{soul}
%\soulregister{\cl}{7} irrelevant
%\soulregister{\sethlcolor}{7}
\definecolor{inlineBG}{HTML}{F1F1F1}
\newcommand{\cl}[2]{\textcolor[HTML]{#1}{#2}}
\newcommand{\codeinline}[1]{%
\sethlcolor{inlineBG}{%
\texttt{\hl{#1}}}%
}
\begin{document}
% ok :
\codeinline{ {\cl{FF0000}{Hello}} }
% Package soul Error: Reconstruction failed.
\codeinline{ {\cl{FF0000}{Hellooooooooooooooooooooooooooooooooooooooooo}} }
\codeinline{ {\cl{FF0000}{Hello World}} }
\end{document}
the first \codeinline works fine, not the others. How can i fix it ?

minimalclass! – Jan 19 '18 at 19:31\soulregister{\sethlcolor}{7}same issue. – nikopol Jan 19 '18 at 19:35\soulregister– Jan 19 '18 at 19:37\soulregisterisn't relevant in my mwe because the issue is the same with or without it – nikopol Jan 20 '18 at 13:57\soulregisteragain ... but it's your question of course. – Jan 20 '18 at 17:37\soulregister, no one knows? – nikopol Jan 21 '18 at 13:38