Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Merge branch 'main' of github.com:outline/rich-markdown-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Nov 26, 2021
2 parents ddb91e6 + 0f36464 commit af9aa0d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/nodes/CodeFence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import java from "refractor/lang/java";
import javascript from "refractor/lang/javascript";
import json from "refractor/lang/json";
import markup from "refractor/lang/markup";
import objectivec from "refractor/lang/objectivec";
import perl from "refractor/lang/perl";
import php from "refractor/lang/php";
import python from "refractor/lang/python";
Expand Down Expand Up @@ -39,6 +40,7 @@ const DEFAULT_LANGUAGE = "javascript";
javascript,
json,
markup,
objectivec,
perl,
php,
python,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/BlockMenuTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Extension from "../lib/Extension";

const MAX_MATCH = 500;
const OPEN_REGEX = /^\/(\w+)?$/;
const CLOSE_REGEX = /(^(?!\/(\w+)?)(.*)$|^\/((\w+)\s.*|\s)$)/;
const CLOSE_REGEX = /(^(?!\/(\w+)?)(.*)$|^\/(([\w\W]+)\s.*|\s)$|^\/((\W)+)$)/;

// based on the input rules code in Prosemirror, here:
// https://github.com/ProseMirror/prosemirror-inputrules/blob/master/src/inputrules.js
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/EmojiTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Extension from "../lib/Extension";
import isInCode from "../queries/isInCode";
import { run } from "./BlockMenuTrigger";

const OPEN_REGEX = /(?:^|[^a-zA-Z0-9_!#$%&*@@]):([0-9a-zA-Z_+-]+)?$/;
const CLOSE_REGEX = /(?:^|[^a-zA-Z0-9_!#$%&*@@]):(([0-9a-zA-Z_+-]*\s+)|(\s+[0-9a-zA-Z_+-]+)|[^0-9a-zA-Z_+-]+)$/;
const OPEN_REGEX = /(?:^|\s):([0-9a-zA-Z_+-]+)?$/;
const CLOSE_REGEX = /(?:^|\s):(([0-9a-zA-Z_+-]*\s+)|(\s+[0-9a-zA-Z_+-]+)|[^0-9a-zA-Z_+-]+)$/;

export default class EmojiTrigger extends Extension {
get name() {
Expand Down
1 change: 1 addition & 0 deletions src/plugins/Prism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const LANGUAGES = {
csharp: "C#",
go: "Go",
markup: "HTML",
objectivec: "Objective-C",
java: "Java",
javascript: "JavaScript",
json: "JSON",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10706,9 +10706,9 @@ sshpk@^1.7.0:
tweetnacl "~0.14.0"

ssri@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
version "6.0.2"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
dependencies:
figgy-pudding "^3.5.1"

Expand Down

0 comments on commit af9aa0d

Please sign in to comment.