Currently, the linter replaces & with literal and; however, there are some cases where it may be preferable to continue using the symbol (e.g. && within an inline code block).
We should investigate whether the ampersand can be escaped within the logic below without affecting the LaTeX generation.
def replace_ampersand_in_findings_headings(line):
# If the line is a finding markdown heading and contains '&', replace '&' with 'and'
if line.strip().startswith('###') and '&' in line:
line = line.replace('&', 'and')
return line
Currently, the linter replaces
&with literaland; however, there are some cases where it may be preferable to continue using the symbol (e.g.&&within an inline code block).We should investigate whether the ampersand can be escaped within the logic below without affecting the LaTeX generation.