Closed philj56 closed 3 years ago
Thank you, this error is due to a recent change to start supporting inline syntax inside of generic directives (e.g. .. note::
). Unfortunately .. math::
is not a generic directive and is probably better interpreted as .. code:: latex
.
So I believe the solution here is to create an exception for .. math::
.
As for the |E| + 3
vs |E|+3
, I think that the highlights are correct, since inline tokens require a blank character after the termination.
But I agree it's not correct to interpret this as a substitution inside of a math directive.
My memory seems to be failing me; I believe this is a special case of #54.
Ah you're right, I hadn't read all the way through that issue
@madjxatw I've just applied your patch, which I should have done ages ago. Very sorry about that, sometimes I get too comfortable with the GitHub PR process.
While the particular problem has been solved, I think the discussion here is a good one and still unresolved, so I'm going to turn on Discussion and move this over there.
The following example shows the issue:
The first line highlights correctly, with the
+ 3
using normal maths highlighting. On the second line, the lack of whitespace causes the|E|
highlighting to never end, and carries on through the whole document until another||
pair followed by whitespace is found.Edit: Actually this doesn't just apply to math mode, the same thing happens without the directive.