From b84fa3865a8b75b71a6ded443c656079df14b8d8 Mon Sep 17 00:00:00 2001 From: Matt Jennings Date: Mon, 15 Nov 2021 19:43:38 -0600 Subject: [PATCH] update README example --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 57216bb..71d6ad0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Adds estimated reading time to your markdown files using [reading-time](https:// import readingTime from "remark-reading-time"; remark() - .use(readingTime()) + .use(readingTime) .process(markdown, function (err, file) { console.log("Reading time is " + file.data.readingTime.text); }); @@ -21,7 +21,7 @@ changed: import readingTime from "remark-reading-time"; remark() - .use(readingTime({ attribute: "myKeyName" })) + .use(readingTime, { attribute: "myKeyName" }) .process(markdown, function (err, file) { console.log("Reading time is " + file.data.myKeyName.text); }); @@ -32,7 +32,7 @@ remark() You can also export the data to MDX files: ```js -import {compile} from '@mdx-js/mdx' +import { compile } from "@mdx-js/mdx"; import readingTime from "remark-reading-time"; import readingMdxTime from "remark-reading-time/mdx"; @@ -42,6 +42,6 @@ const code = await compile(file, { remarkReadingTime, readingMdxTime, // register the mdx after the remarkReadingTime plugin ], - } + }, }); ```