on master help sign in
try to log errors in md parsing
163fe47Gavin Atkinson
components/Markdown.js+14−1
@@ -43,7 +43,20 @@ export default async function Markdown({ post }) {
43 })
43 })
44 .use(slug)
44 .use(slug)
45 .use(heading)
45 .use(heading)
46− .process(post.content);
46+ .process(post.content)
47+ .then(
48+ (file) => {
49+ // console.error(reporter(file))
50+
51+ // console.log(String(file))
52+ return file.toString();
53+ },
54+ (error) => {
55+ // Handle your error here!
56+ console.log("error", error);
57+ throw error;
58+ }
59+ );
47
60
48 return result.toString();
61 return result.toString();
49}
62}