An unterminated single or double quote inside a multi-line @doc construct will inhibit prettify-symbols-mode from functioning correctly. The function prettify-symbols-default-compose-p is specific about when it's willing to prettify a symbol and it appears that the syntax class of the character preceding the symbol is incorrect.
With the simple configuration
(push '("|>" . "▷") prettify-symbols-alist)
we get
@doc """
documentation is here
"""
def test do
:an_atom
▷ IO.inspect
end
@doc """
here's the error, note the apostrophe
"""
def test_2 do
:an_atom
|> IO.inspect
end
Single line comments don't trigger the issue. A lone double quote will. Matched quotes of either sort will not.
Not, obviously, a serious or pressing issue! I happen to use a lot of contractions in my docs and noticed the behavior though I'm stumped how best to address it.
An unterminated single or double quote inside a multi-line
@docconstruct will inhibitprettify-symbols-modefrom functioning correctly. The functionprettify-symbols-default-compose-pis specific about when it's willing to prettify a symbol and it appears that the syntax class of the character preceding the symbol is incorrect.With the simple configuration
we get
Single line comments don't trigger the issue. A lone double quote will. Matched quotes of either sort will not.
Not, obviously, a serious or pressing issue! I happen to use a lot of contractions in my docs and noticed the behavior though I'm stumped how best to address it.