julia-vscode / DocumentFormat.jl

Auto-formatter for Julia
Other
62 stars 18 forks source link

Code reformat removes \\ in latex comments #37

Closed classner closed 2 years ago

classner commented 5 years ago

Hi!

Thanks for creating this powerful package! I'm using the language server with the Emacs frontend and am observing automatic removal of double-backslashes from latex comments, e.g., a comment like

"""
    Some-function

Calculates ``a \\in b``.
"""

gets reformatted to

"""
    Some-function

Calculates ``a \in b``.
"""

Even though I'd also prefer the latter version in principle ;-), only the former works with Documenter.jl.

davidanthoff commented 5 years ago

I can replicate that in VS Code as well.

ZacLN commented 5 years ago

I don't think I'll be able to fix this quickly so putting it to the backlog

davidanthoff commented 5 years ago

I think this is the one issue I'm pretty nervous about :) It does look like a bug that can actually introduce very subtle errors into user code... @ZacLN do you think there is a chance we can fix this for v0.12.0, or did you think of pushing this back to a much later release?

ZacLN commented 5 years ago

I don't have the time to delve into it for the next couple of weeks (until the start of July). I'll disable the affected code

davidanthoff commented 5 years ago

That sounds like a good plan!