From 6d9f1358c7e4a6e919c32da51a338bf7985e0176 Mon Sep 17 00:00:00 2001 From: Adam Joseph Arling Date: Thu, 13 Jun 2024 14:33:09 -0500 Subject: [PATCH] Update readme with example usage of 'html' value, and point to the Github repository in package.json file --- README.md | 11 +++++++++++ package.json | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index e3f4db3..dcf6ab1 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,17 @@ const MyComponent = () => { export default MyComponent; ``` +Alternatively, you can do something with the `html` string directly. + +```jsx +const { html } = useMarkdown(markdown); + +// Do something with the html string +const newHtml = html + "

foo

"; + +return
; +``` + ## Development Run in development environment. diff --git a/package.json b/package.json index ce40fbb..76b910f 100644 --- a/package.json +++ b/package.json @@ -47,5 +47,9 @@ "peerDependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/nulib/use-markdown" } }