pandoc-3.14: test/command/7744.md
ANSI escape sequences are stripped from code in output cells
unless the output is ipynb (#5633). This used to take time
quadratic in the length of the output (#7744).
```
% pandoc -f ipynb -t native
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;31mError\u001b[0m: café 日本\n",
"[0m and \u001b(B are kept\n",
"\u001b[32m\u001b[1mok\u001b[0m\u001b[0m\n",
"\u001b[2K\n",
"loading model\n",
"\u001b[31 \u001b[0m tail\n",
"\u001b[1\u001b(Bm end\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"cut \u001b[31 at the end"
]
}
],
"source": [
"print(x)"
]
}
],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
^D
[ Div
( ""
, [ "cell" , "code" ]
, [ ( "execution_count" , "1" ) ]
)
[ CodeBlock ( "" , [ "python" ] , [] ) "print(x)"
, Div
( "" , [ "output" , "stream" , "stdout" ] , [] )
[ CodeBlock
( "" , [] , [] )
"Error: caf\233 \26085\26412\n[0m and \ESC(B are kept\nok\nodel\n tail\n end\n"
]
, Div
( "" , [ "output" , "stream" , "stderr" ] , [] )
[ CodeBlock ( "" , [] , [] ) "cut " ]
]
]
```