:1\\x1b[0m\n",
+ "\\x1b[0;32m----> 1\\x1b[0m \\x1b[38;5;241m1\\x1b[39m\\x1b[38;5;241m/\\x1b[39m\\x1b[38;5;241m0\\x1b[39m\n",
+ "\n",
+ "\\x1b[0;31mZeroDivisionError\\x1b[0m: division by zero\"\"\""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "9deb6835",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "---------------------------------------------------------------------------\n",
+ "ZeroDivisionError Traceback (most recent call last)\n",
+ "File <input-1>:1\n",
+ "----> 1 1/0\n",
+ "\n",
+ "ZeroDivisionError: division by zero\n"
+ ]
+ }
+ ],
+ "source": [
+ "out = ansi2html(ansi_test)\n",
+ "print(out)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "57d28b0a",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
File <input-1>:1
----> 1 1/0
ZeroDivisionError: division by zero
"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": null,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "test_err = ''.join([f\"{o}
\" for o in out.splitlines()])\n",
+ "HTML(f'{test_err}')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "93895b9e",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "---------------------------------------------------------------------------\n",
+ "ZeroDivisionError Traceback (most recent call last)\n",
+ "File :1\n",
+ "----> 1 1/0\n",
+ "\n",
+ "ZeroDivisionError: division by zero\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(strip_ansi(ansi_tests))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ce817290",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "python3",
+ "language": "python",
+ "name": "python3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}