From bce4434db97893127800cce6fa43691090b79755 Mon Sep 17 00:00:00 2001 From: David Street Date: Fri, 4 Nov 2016 04:16:29 -0400 Subject: [PATCH] Add syntax highlighting to debug error page (#195) --- package.json | 2 +- pages/_error-debug.js | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 356e7557..16c83c5a 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "parser": "babel-eslint" }, "dependencies": { + "ansi-html": "0.0.6", "babel-core": "6.17.0", "babel-generator": "6.17.0", "babel-loader": "6.2.5", @@ -65,7 +66,6 @@ "react-dom": "15.3.2", "react-hot-loader": "3.0.0-beta.6", "send": "0.14.1", - "strip-ansi": "3.0.1", "url": "0.11.0", "webpack": "1.13.2", "webpack-dev-server": "1.16.2", diff --git a/pages/_error-debug.js b/pages/_error-debug.js index 82e082c6..066b24fe 100644 --- a/pages/_error-debug.js +++ b/pages/_error-debug.js @@ -1,5 +1,5 @@ import React from 'react' -import stripAnsi from 'strip-ansi' +import ansiHTML from 'ansi-html' import Head from 'next/head' import style from 'next/css' @@ -16,20 +16,24 @@ export default class ErrorDebug extends React.Component {