Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a430c0dfd7 | ||
|
|
e850d48fc3 | ||
|
|
8ea2b0b63b | ||
|
|
e170d02bff | ||
|
|
1f872a9b0c | ||
|
|
bcdc1d8915 | ||
|
|
f577435e98 | ||
|
|
bf94550a84 | ||
|
|
a900b04254 | ||
|
|
3fe5a9d222 | ||
|
|
a07a7676b7 | ||
|
|
593cc03962 | ||
|
|
820f255929 | ||
|
|
7db4146c8d | ||
|
|
91a6916f4c | ||
|
|
78374d0301 | ||
|
|
9185ee0cf9 |
No files matched your search
@@ -14,7 +14,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3.0.2
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3.4.1
|
||||
uses: actions/setup-node@v3.5.0
|
||||
with:
|
||||
node-version: 17.9.0
|
||||
cache: 'npm'
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3.0.2
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3.4.1
|
||||
uses: actions/setup-node@v3.5.0
|
||||
with:
|
||||
node-version: 17.9.0
|
||||
cache: 'npm'
|
||||
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3.0.2
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3.4.1
|
||||
uses: actions/setup-node@v3.5.0
|
||||
with:
|
||||
node-version: 17.9.0
|
||||
cache: 'npm'
|
||||
|
||||
Generated
+330
-286
File diff suppressed because it is too large.
Load diff
+8
-8
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cinny",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.2",
|
||||
"description": "Yet another matrix client",
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
@@ -15,13 +15,13 @@
|
||||
"author": "Ajay Bura",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fontsource/inter": "4.5.12",
|
||||
"@fontsource/inter": "4.5.13",
|
||||
"@fontsource/roboto": "4.5.8",
|
||||
"@khanacademy/simple-markdown": "0.8.4",
|
||||
"@matrix-org/olm": "3.2.12",
|
||||
"@tippyjs/react": "4.2.6",
|
||||
"babel-polyfill": "6.26.0",
|
||||
"blurhash": "2.0.0",
|
||||
"blurhash": "2.0.3",
|
||||
"browser-encrypt-attachment": "0.3.0",
|
||||
"dateformat": "5.0.3",
|
||||
"emojibase-data": "7.0.1",
|
||||
@@ -30,9 +30,9 @@
|
||||
"formik": "2.2.9",
|
||||
"html-react-parser": "3.0.4",
|
||||
"katex": "0.16.2",
|
||||
"linkify-html": "4.0.0",
|
||||
"linkifyjs": "4.0.0",
|
||||
"matrix-js-sdk": "19.7.0",
|
||||
"linkify-html": "4.0.2",
|
||||
"linkifyjs": "4.0.2",
|
||||
"matrix-js-sdk": "20.0.2",
|
||||
"prop-types": "15.8.1",
|
||||
"react": "17.0.2",
|
||||
"react-autosize-textarea": "7.1.0",
|
||||
@@ -47,8 +47,8 @@
|
||||
"twemoji": "14.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.19.1",
|
||||
"@babel/preset-env": "7.19.1",
|
||||
"@babel/core": "7.19.3",
|
||||
"@babel/preset-env": "7.19.3",
|
||||
"@babel/preset-react": "7.18.6",
|
||||
"assert": "2.0.0",
|
||||
"babel-loader": "8.2.5",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const cons = {
|
||||
version: '2.2.0',
|
||||
version: '2.2.2',
|
||||
secretKey: {
|
||||
ACCESS_TOKEN: 'cinny_access_token',
|
||||
DEVICE_ID: 'cinny_device_id',
|
||||
|
||||
+24
-8
@@ -82,12 +82,22 @@ const plainRules = {
|
||||
},
|
||||
newline: {
|
||||
...defaultRules.newline,
|
||||
match: blockRegex(/^ *\n/),
|
||||
plain: () => '\n',
|
||||
html: () => '<br>',
|
||||
},
|
||||
paragraph: {
|
||||
...defaultRules.paragraph,
|
||||
plain: (node, output, state) => `${output(node.content, state)}\n\n`,
|
||||
html: (node, output, state) => htmlTag('p', output(node.content, state)),
|
||||
match: (source, state) => {
|
||||
const endMatch = blockRegex(/^([^\n]*)\n*$/);
|
||||
if (endMatch) {
|
||||
state.end = true;
|
||||
return endMatch(source, state);
|
||||
}
|
||||
return blockRegex(/^([^\n]*)\n?/)(source, state);
|
||||
},
|
||||
plain: (node, output, state) => `${output(node.content, state)}${state.end ? '' : '\n'}`,
|
||||
html: (node, output, state) => `${output(node.content, state)}${state.end ? '' : '<br>'}`,
|
||||
},
|
||||
escape: {
|
||||
...defaultRules.escape,
|
||||
@@ -101,9 +111,7 @@ const plainRules = {
|
||||
text: {
|
||||
...defaultRules.text,
|
||||
match: anyScopeRegex(/^[\s\S]+?(?=[^0-9A-Za-z\s\u00c0-\uffff]| *\n|\w+:\S|$)/),
|
||||
plain: (node, _, state) => (state.kind === 'edit'
|
||||
? node.content.replace(/(\*|_|!\[|\[|\|\||\$\$?)/g, '\\$1')
|
||||
: node.content),
|
||||
plain: (node) => node.content,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -138,7 +146,15 @@ const markdownRules = {
|
||||
},
|
||||
blockQuote: {
|
||||
...defaultRules.blockQuote,
|
||||
plain: (node, output, state) => `> ${output(node.content, state).trim().replace(/\n/g, '\n> ')}\n\n`,
|
||||
match: blockRegex(/^( *>[^\n]+(\n *>+[^\n]+)*\n?)+/),
|
||||
parse: (capture, parse, state) => {
|
||||
const content = capture[0].replace(/^ *> ?/gm, '');
|
||||
return {
|
||||
content: parse(`${content}`, state),
|
||||
};
|
||||
},
|
||||
plain: (node, output, state) => `> ${output(node.content, state).trim().replace(/\n/g, '\n> ')}\n`,
|
||||
html: (node, output, state) => htmlTag('blockquote', output(node.content, state)),
|
||||
},
|
||||
list: {
|
||||
...defaultRules.list,
|
||||
@@ -492,11 +508,11 @@ function render(content, state, plainOut, htmlOut) {
|
||||
};
|
||||
}
|
||||
|
||||
const plainParser = parserFor(plainRules);
|
||||
const plainParser = parserFor(plainRules, { disableAutoBlockNewlines: true });
|
||||
const plainPlainOut = outputFor(plainRules, 'plain');
|
||||
const plainHtmlOut = outputFor(plainRules, 'html');
|
||||
|
||||
const mdParser = parserFor(markdownRules);
|
||||
const mdParser = parserFor(markdownRules, { disableAutoBlockNewlines: true });
|
||||
const mdPlainOut = outputFor(markdownRules, 'plain');
|
||||
const mdHtmlOut = outputFor(markdownRules, 'html');
|
||||
|
||||
|
||||
Reference in new issue
Block a user