# Character count for special formatting in comments: source or output?

I would expect that special symbols such as $ and \frac{abc}{def} are excluded from the character count in comments. So that \frac{abc}{def} counts as just 7 characters instead of 15. And similarly $1$ as just 1 character instead of 3. Because maybe this discourages use of special formatting in comments. Not sure if this is intended behavior or a known issue. • This is certainly intended behavior and not a bug. Note that for example *A* displaying as A also counts as three charactes. It would also be hard to decide what to do exactly instead, leaving aside that it'd be hard to implement, too. How many characters exactly for$\sum_{n=1}^4 n^2$? To discourage overly long and complex comments is actually desirable. – quid Mod May 6 '17 at 22:15 • I have added (character-limit) tag. I was not sure whether to add als (mathjax) - although based on the formulation of (the current version of) your question it seems that you are mainly concerned with MahJax in comments. May 7 '17 at 5:25 •${}{}{}{}{}{}{}{}$May 9 '17 at 4:00 • Can be done via ${}{}{}{}{}{}{}{}\$ May 9 '17 at 4:01

This is certainly not a bug. As mentioned in comments, character count for other formatting options is also by code and not by output. For example **1** is counted as five characters, although it is only rendered as 1. Similarly [a](http://spaaaccccce.com/Space_going_to_space_cant_wait_Oh_oh_oh_This_is_space_Im_in_space_Wanna_go_to_space_Im_going_to_space_Gonna_be_in_space) will count as 147 characters, but again is rendered as a single character. And this goes for magic links in comments, too, where the four character [so] renders as the fourteen character Stack Overflow.
As an aside, to a certain extent it is an accident that MathJax renders in comments at all. Across the network only a very limited subset of MarkDown is available to be used in comments: bold, italics, code and links. On MathJax-enabled sites, MathJax is rendered throughout every page, and is not restricted to posts, titles, and other elements one would expect MathJax. This allows MathJax in comments, but also sometimes forces MathJax to render where it should not: for example, question titles in the Hot Network Questions list from non-MathJax-enabled sites about money might be rendered as if dollar signs were MathJax delimiters.