How can I modify the runin template of the exercise/solution environment of xsim package to ignore an empty line at the beginning of the environment in the source code?
Thanks
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{xsim}
% template taken from xsim manual
% https://ctan.math.illinois.edu/macros/latex/contrib/xsim/xsim-manual.pdf
\usepackage{needspace}
\DeclareExerciseEnvironmentTemplate{runin}
{%
\par\vspace{\baselineskip}
\Needspace*{2\baselineskip}
\noindent
\textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
\GetExercisePropertyT{subtitle}{ \textit{#1}} % <<< notice the space
\IfInsideSolutionF{%
\GetExercisePropertyT{points}{%
\marginpar{%
\printgoal{\PropertyValue}%
\GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
\,\IfExerciseGoalSingularTF{points}
{\XSIMtranslate{point}}
{\XSIMtranslate{points}}%
}%
}%
}%
}
{}
\xsimsetup{%
exercise/template = runin,
solution/print = true
}
\begin{document}
\begin{exercise}
\lipsum[1]
\end{exercise}
\begin{exercise}
\lipsum[1]
\end{exercise}
\vspace{2cm}
I would like the text of exercise 2 to start on the same line as ``Exercise 2'' (looking like Exercise 1) despite the presence of an empty line at the beginning of the environment.
\end{document}