Investigate the linked commit to understand how doc strings are processed in elm format. The bug occurs when asterisks in doc strings are escaped incorrectly. Look at the parser or formatter module responsible for doc string formatting, likely in ElmFormat.hs or similar. Check the existing tests for doc string formatting and add a failing test for this case. Then modify the escaping logic to preserve asterisks as is.
Asterisks get escaped in doc strings · avh4/elm-format#540 | Good First Issue