Dear Maintainer,
When I tried to accept the changes introduced into the LaTeX source with
changes package, I found that
the caption of one of my figures got corrupted. After some experimenting
I have found that the problem
occurs when the caption is defined in multiple lines of the LaTeX file.
Below are the results of running the pyMergeChanges on two LaTeX files.
The first one with caption in a single line, and the second with caption
split into two lines.
======================
$ /usr/share/texlive/texmf-dist/scripts/changes/pyMergeChanges.py -a
merges_correctly.tex merged_correctly.tex Accepting all added, deleted
and replaced
******** In Line 7 :
\caption{\label{fig:f1} Example figure based on~\cite{cited_work_1}.
\added{As proven in~\cite{cited_work_1}, the system may be simplified.}}
** add commit ** \added{As proven in~\cite{cited_work_1}, the system may
be simplified.}
Accepted.
Result: \caption{\label{fig:f1} Example figure based
on~\cite{cited_work_1}. As proven in~\cite{cited_work_1}, the system may
be simplified.}
$ /usr/share/texlive/texmf-dist/scripts/changes/pyMergeChanges.py -a
merges_incorrectly.tex merged_incorrectly.tex Accepting all added,
deleted and replaced
******** In Line 7 :
\caption{\label{fig:f1} Example figure based on~\cite{cited_work_1}.
\added{As proven in~\cite{cited_work_1},
** add commit ** \added{As proven in~\cite{cited_work_1}
Accepted.
Result: \caption{\label{fig:f1} Example figure based
on~\cite{cited_work_1}. As proven in~\cite{cited_work_1,
=====================
As you can see, in the second case, the pyMergeChanges.py incorrectly
identified the closing brace of the \added{} section.
I attach the archive with both source files and the results of merging.