This gets mangled by the markdown processing:
<a href="http://abc" class="foo-$">test $</a>
The reason is because smc-util/mathjax-utils.js is NOT a full parser, but just some heuristics, and it gets this wrong. It replaces
<a href="http://abc" class="foo-$">test $</a>```
by
<a href="http://abc" class="foo-@@0@@
then runs the normal markdown processor, then puts `$">test $` back.
Note that exactly this is ALSO broken in Jupyter Classic, which uses the same heuristics rather than a real parser.