This behaviour seems to happen only when the last character is a capital letter, but does not happen when it is in lower case.
This also happens with other punctuation symbols:
\subsubsection{WTF!} → WTF!.\subsubsection{WTF.} → WTF..
This does not happen if the punctuation symbol is repeated more than once:
\subsubsection{WTF??} → WTF??
Also this problem does not arise when you use \subsection or \section.
Workaround
I don't really understand the acmart.cls file but was able to produce the following workaround with chatgpt which seems to be working:
Example document
Observed behaviour:
\subsubsection{WTF?}
→WTF?.
Expected behaviour:\subsubsection{WTF?}
→WTF?
The problem
This behaviour seems to happen only when the last character is a capital letter, but does not happen when it is in lower case. This also happens with other punctuation symbols:
\subsubsection{WTF!}
→WTF!.
\subsubsection{WTF.}
→WTF..
This does not happen if the punctuation symbol is repeated more than once:
\subsubsection{WTF??}
→WTF??
Also this problem does not arise when you use
\subsection
or\section
.Workaround
I don't really understand the
acmart.cls
file but was able to produce the following workaround with chatgpt which seems to be working: