I am trying to typeset synthetic division. I am using the following code:
\[
\left.\begin{array}[t]{c}1\\ \,\end{array}\right|\!\begin{array}[t]{cccc}1& 2& -5& 2\\ & 1& 3& -2\\ \hline 1& 3& -2& 0\end{array}
\]
The output I get is the following:
Why does the vertical line go way beyond the top of the array?
I need a vertical line of the size of the first two lines of the array on the right. I am trying to achieve it using KaTeX so I can only use the commands KaTeX supports. Adding extra packages is not possible.