\ProvidesExplPackage {luamml-patches-lab-math} {2025-03-06} {0.5.0}
  {Feel free to add a description here}

% This definition is identical to the one in latex-lab-math.
% The redefinition and the whole patch file can be removed in 2025-06-01
\IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24}
 {}
 {
  \AddToHook{begindocument} {
  \PackageInfo{luamml}{patching~\string\common@align@ending}
  \cs_set:Npn \common@align@ending {
    \math@cr
    \black@ \totwidth@
    \UseExpandableTaggingSocket{math/luamml/mtable/finalize}{align}
    \egroup
    \ifingather@
      \restorealignstate@
      \egroup
      \nonumber
      \ifnum0=`{\fi\iffalse}\fi
    \else
      $$
    \fi
    \ignorespacesafterend
   }
  }
}
