Skip to content

Commit

Permalink
Fix html processing
Browse files Browse the repository at this point in the history
Also remove nanoid since it's not currently used.
  • Loading branch information
TomNUSDS committed Mar 8, 2024
1 parent 4b5422f commit f801050
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"mdast-util-gfm": "^3.0.0",
"micromark-extension-gfm": "^3.0.0",
"moment": "^2.30.1",
"nanoid": "^5.0.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.44.2",
Expand Down
1 change: 0 additions & 1 deletion src/components/showToast.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {toast} from "react-toastify";
import {getShortNanoid} from "../misc.ts";

export const showToast = (
message: React.ReactNode | Error,
Expand Down
4 changes: 0 additions & 4 deletions src/misc.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import {customAlphabet} from "nanoid/non-secure";
import moment from "moment";
import {MDXEditorMethods} from "@mdxeditor/editor";
import {CACHE_NAME} from "./types/commontypes.ts";


// we want to avoid the risk of bad words, so we leave out vowels and `0`.
export const getShortNanoid = (length = 6) => customAlphabet(`bcdfghjklmnpqrstvwxyz123456789`, length)();

export const getFilnamePartOfUrlPath = (pathstr?: string) => pathstr?.split("/").pop() ?? "";

export const forceTypeBoolean = (value: string | null | boolean): boolean | null =>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BlogEditorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const BlogEditorPage = () => {
ref={mdxeditorref}
className={"grid-container"}
contentEditableClassName={"tablet:grid-col-8 desktop:grid-col-12 margin-bottom-9 tablet:padding-right-4 site-c-project-content usa-prose"}
suppressHtmlProcessing={true}
suppressHtmlProcessing={false}
markdown={""}
onChange={(mdtext) => saveMdText(mdtext)}
toMarkdownOptions={toMarkdownOptions}
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4042,11 +4042,6 @@ nanoid@^3.3.7:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==

nanoid@^5.0.5:
version "5.0.6"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-5.0.6.tgz#7f99a033aa843e4dcf9778bdaec5eb02f4dc44d5"
integrity sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA==

natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
Expand Down

0 comments on commit f801050

Please sign in to comment.