Skip to content

Commit d516b44

Browse files
author
Rajat Saxena
committed
Triple backticks are crashing the text editor
Fixes #640
1 parent a0ad57e commit d516b44

6 files changed

Lines changed: 34 additions & 42 deletions

File tree

apps/web/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference types="next/navigation-types/compat/navigation" />
34
/// <reference path="./.next/types/routes.d.ts" />
45

56
// NOTE: This file should not be edited

packages/components-library/src/styles.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@
7373
@apply list-decimal ml-6;
7474
}
7575

76-
/* Remove duplicate rule */
77-
/* :is(ol) {
78-
@apply list-decimal;
79-
} */
80-
8176
/* Remove margin from last paragraph in divs */
8277
:is(div) > p:last-of-type {
8378
@apply mb-0;
@@ -114,7 +109,7 @@
114109

115110
/* Link styling */
116111
:is(a) {
117-
@apply underline decoration-dotted decoration-2 underline-offset-2 transition-all duration-200 hover:decoration-solid;
112+
@apply underline decoration-2 underline-offset-2 transition-all duration-200 hover:decoration-dotted;
118113
}
119114

120115
/* Better spacing for content sections */

packages/text-editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
"dependencies": {
4343
"@codemirror/language-data": "^6.5.1",
44-
"@codemirror/state": "6.4.1",
44+
"@codemirror/state": "^6.5.2",
4545
"@codemirror/theme-one-dark": "^6.1.2",
4646
"@courselit/common-models": "workspace:^",
4747
"@courselit/utils": "workspace:^",

packages/text-editor/src/Renderer/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ const markMap: MarkMap = {
5353
italic: "em",
5454
bold: "strong",
5555
code: "code",
56-
link: createLinkHandler({ target: "_blank" }),
56+
link: createLinkHandler({ target: "_blank", rel: "noopener noreferrer" }),
5757
underline: "u",
58+
strike: "strike",
5859
};
5960

6061
interface RendererProps {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { FC } from "react";
2-
import { WysiwygToolbar } from "@remirror/react-ui";
2+
import { Toolbar as RemirrorToolbar } from "@remirror/react-ui";
33

44
const Toolbar: FC = () => {
5-
return <WysiwygToolbar />;
5+
return <RemirrorToolbar></RemirrorToolbar>;
66
};
77

88
export default Toolbar;

pnpm-lock.yaml

Lines changed: 27 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)