Compare commits
46 Commits
Author | SHA1 | Date | |
---|---|---|---|
9f2d8e1d51 | |||
0c98a90b75 | |||
0047920c1a | |||
e4bb534f20 | |||
3fc04fcdc5 | |||
e542dcac30 | |||
a0b13505a0 | |||
389f9bfea2 | |||
630a534cee | |||
5744c391e6 | |||
b9b05a7401 | |||
359470a263 | |||
3fe934ee62 | |||
3abe632f06 | |||
65961bc15b | |||
12f932d48a | |||
54e9147782 | |||
31b7626d01 | |||
200ebefe92 | |||
9d29a2e85a | |||
c62a225542 | |||
d5d995a3e6 | |||
b7f10fdc10 | |||
cbba03b376 | |||
f84e9c7dc8 | |||
a22ddb1fb9 | |||
0d23ce3d45 | |||
9719387bee | |||
dca110ebaa | |||
136f23c7ad | |||
0963e6d6e1 | |||
712802e682 | |||
abe99c3c73 | |||
d7a3b71028 | |||
10c434f24a | |||
fe46c53ea6 | |||
cdd123dfd3 | |||
a1a3ee44b5 | |||
4e7fbd8967 | |||
a86c419f95 | |||
e3ec0ad97e | |||
75791981ce | |||
e813fe16b9 | |||
42ac7b954d | |||
c1bbf5dab6 | |||
e16dc2a910 |
@ -23,6 +23,10 @@ jobs:
|
||||
executor: default
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Ensure package-lock.json
|
||||
command: |
|
||||
[ ! -e package-lock.json ] && echo '{}' > package-lock.json
|
||||
- restore_cache:
|
||||
name: Restore npm package caches
|
||||
keys:
|
||||
@ -35,6 +39,7 @@ jobs:
|
||||
name: Install Dependencies
|
||||
command: |
|
||||
npm install
|
||||
npm prune
|
||||
- run:
|
||||
name: Configure
|
||||
command: |
|
||||
@ -50,8 +55,8 @@ jobs:
|
||||
key: npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "package-lock.json" }}-ls-{{ checksum "ls" }}
|
||||
paths:
|
||||
- node_modules
|
||||
- store_artifacts:
|
||||
path: built
|
||||
# - store_artifacts:
|
||||
# path: built
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
@ -98,7 +103,6 @@ jobs:
|
||||
name: Build
|
||||
command: |
|
||||
docker build . | tee docker.log
|
||||
tail -n 1 docker.log | read __Successfully __built tag
|
||||
- when:
|
||||
condition: <<parameters.with_deploy>>
|
||||
steps:
|
||||
@ -107,6 +111,7 @@ jobs:
|
||||
command: |
|
||||
if [ "$DOCKERHUB_USERNAME$DOCKERHUB_PASSWORD" ]
|
||||
then
|
||||
tail -n 1 docker.log | read __Successfully __built tag
|
||||
docker tag $tag misskey/misskey
|
||||
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
|
||||
docker push misskey/misskey
|
||||
@ -126,10 +131,13 @@ workflows:
|
||||
without_redis: "true"
|
||||
requires:
|
||||
- build
|
||||
- docker:
|
||||
filters:
|
||||
branches:
|
||||
ignore: master
|
||||
only: master
|
||||
# - docker:
|
||||
# filters:
|
||||
# branches:
|
||||
# ignore: master
|
||||
- docker:
|
||||
with_deploy: "true"
|
||||
filters:
|
||||
|
@ -167,6 +167,3 @@ drive:
|
||||
# external: true
|
||||
# engine: http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}
|
||||
# timeout: 300000
|
||||
|
||||
# Max allowed note text length in charactors
|
||||
maxNoteTextLength: 1000
|
||||
|
41
.travis.yml
41
.travis.yml
@ -1,41 +0,0 @@
|
||||
# travis file
|
||||
# https://docs.travis-ci.com/user/customizing-the-build
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
branches:
|
||||
except:
|
||||
- l10n_master
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 11.0.0
|
||||
|
||||
env:
|
||||
- CXX=g++-4.8 NODE_ENV=production
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
services:
|
||||
- mongodb
|
||||
- redis-server
|
||||
|
||||
before_script:
|
||||
- npm install
|
||||
|
||||
# 設定ファイルを配置
|
||||
- cp ./.ci/default.yml ./.config
|
||||
- cp ./.ci/test.yml ./.config
|
||||
|
||||
- travis_wait npm run build
|
@ -23,5 +23,5 @@ Please use [Crowdin](https://crowdin.com/project/misskey) for localization.
|
||||
* Test codes are located in `/test`.
|
||||
|
||||
## Continuous integration
|
||||
Misskey uses Travis for automated test.
|
||||
Configuration files are located in `/.travis`.
|
||||
Misskey uses CircleCI for automated test.
|
||||
Configuration files are located in `/.circleci`.
|
||||
|
@ -4,7 +4,6 @@
|
||||
================================================================
|
||||
|
||||
[](https://circleci.com/gh/syuilo/misskey)
|
||||
[![][travis-badge]][travis-link]
|
||||
[![][dependencies-badge]][dependencies-link]
|
||||
[](http://makeapullrequest.com)
|
||||
|
||||
@ -44,7 +43,7 @@ Easiest way to tell your emotions. Misskey allows you to add various type of rea
|
||||
|
||||
<h3 align="left">Interface</h3>
|
||||
<p align="left">
|
||||
No UI fits for everyone. Therefore, Misskey has a highly customizable UI for your taste. You can edit layouts of your timeline, place selectable widgets you can easily move and create your unique home as this place will be your home.
|
||||
Highly customizable UI for your taste. We understand no UI fits for everyone. You can edit layouts of your timeline, place selectable widgets you can easily move and create your unique home as this place will be your home.
|
||||
</p>
|
||||
|
||||
---
|
||||
@ -124,8 +123,6 @@ Misskey is an open-source software licensed under the [GNU AGPLv3](LICENSE).
|
||||
|
||||
[agpl-3.0]: https://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
[agpl-3.0-badge]: https://img.shields.io/badge/license-AGPL--3.0-444444.svg?style=flat-square
|
||||
[travis-link]: https://travis-ci.org/syuilo/misskey
|
||||
[travis-badge]: http://img.shields.io/travis/syuilo/misskey/master.svg?style=flat-square
|
||||
[dependencies-link]: https://david-dm.org/syuilo/misskey
|
||||
[dependencies-badge]: https://img.shields.io/david/syuilo/misskey.svg?style=flat-square
|
||||
|
||||
|
@ -22,7 +22,7 @@ adduser --disabled-password --disabled-login misskey
|
||||
Please install and setup these softwares:
|
||||
|
||||
#### Dependencies :package:
|
||||
* **[Node.js](https://nodejs.org/en/)**
|
||||
* **[Node.js](https://nodejs.org/en/)** >= 10.0.0
|
||||
* **[MongoDB](https://www.mongodb.com/)** >= 3.6
|
||||
|
||||
##### Optional
|
||||
|
@ -22,7 +22,7 @@ adduser --disabled-password --disabled-login misskey
|
||||
これらのソフトウェアをインストール・設定してください:
|
||||
|
||||
#### 依存関係 :package:
|
||||
* **[Node.js](https://nodejs.org/en/)**
|
||||
* **[Node.js](https://nodejs.org/en/)** (10.0.0以上)
|
||||
* **[MongoDB](https://www.mongodb.com/)** (3.6以上)
|
||||
|
||||
##### オプション
|
||||
|
@ -131,6 +131,7 @@ common:
|
||||
show-full-acct: "ユーザー名のホストを省略しない"
|
||||
reduce-motion: "UIの動きを減らす"
|
||||
this-setting-is-this-device-only: "このデバイスのみ"
|
||||
use-os-default-emojis: "OS標準の絵文字を使用"
|
||||
|
||||
do-not-use-in-production: 'これは開発ビルドです。本番環境で使用しないでください。'
|
||||
|
||||
@ -1077,10 +1078,12 @@ admin/views/instance.vue:
|
||||
instance-name: "インスタンス名"
|
||||
instance-description: "インスタンスの紹介"
|
||||
banner-url: "バナー画像URL"
|
||||
disableRegistration: "ユーザー登録の受付を停止する"
|
||||
disableLocalTimeline: "ローカルタイムラインを無効にする"
|
||||
max-note-text-length: "投稿の最大文字数"
|
||||
disable-registration: "ユーザー登録の受付を停止する"
|
||||
disable-local-timeline: "ローカルタイムラインを無効にする"
|
||||
invite: "招待"
|
||||
save: "保存"
|
||||
saved: "保存しました"
|
||||
|
||||
admin/views/charts.vue:
|
||||
title: "チャート"
|
||||
@ -1132,10 +1135,15 @@ admin/views/emoji.vue:
|
||||
url: "絵文字画像URL"
|
||||
add: "追加"
|
||||
info: "50KB以下のPNG画像をおすすめします。"
|
||||
added: "絵文字を登録しました"
|
||||
emojis:
|
||||
title: "絵文字一覧"
|
||||
update: "更新"
|
||||
remove: "削除"
|
||||
updated: "更新しました"
|
||||
remove-emoji:
|
||||
are-you-sure: "「$1」を削除しますか?"
|
||||
removed: "削除しました"
|
||||
|
||||
admin/views/announcements.vue:
|
||||
announcements: "お知らせ"
|
||||
@ -1144,6 +1152,10 @@ admin/views/announcements.vue:
|
||||
add: "追加"
|
||||
title: "タイトル"
|
||||
text: "内容"
|
||||
saved: "保存しました"
|
||||
_remove:
|
||||
are-you-sure: "「$1」を削除しますか?"
|
||||
removed: "削除しました"
|
||||
|
||||
admin/views/hashtags.vue:
|
||||
hided-tags: "Hidden Tags"
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "10.38.6",
|
||||
"clientVersion": "1.0.11516",
|
||||
"version": "10.39.0",
|
||||
"clientVersion": "1.0.11562",
|
||||
"codename": "nighthike",
|
||||
"main": "./built/index.js",
|
||||
"private": true,
|
||||
|
@ -10,7 +10,7 @@
|
||||
<span>%i18n:@text%</span>
|
||||
</ui-textarea>
|
||||
<ui-horizon-group>
|
||||
<ui-button @click="save">%fa:save R% %i18n:@save%</ui-button>
|
||||
<ui-button @click="save()">%fa:save R% %i18n:@save%</ui-button>
|
||||
<ui-button @click="remove(i)">%fa:trash-alt R% %i18n:@remove%</ui-button>
|
||||
</ui-horizon-group>
|
||||
</section>
|
||||
@ -46,17 +46,36 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
remove(i) {
|
||||
this.announcements = this.announcements.filter((_, j) => j !== i);
|
||||
this.save();
|
||||
this.$swal({
|
||||
type: 'warning',
|
||||
text: '%i18n:@_remove.are-you-sure%'.replace('$1', this.announcements.find((_, j) => j == i).title),
|
||||
showCancelButton: true
|
||||
}).then(res => {
|
||||
if (!res.value) return;
|
||||
this.announcements = this.announcements.filter((_, j) => j !== i);
|
||||
this.save(true);
|
||||
this.$swal({
|
||||
type: 'success',
|
||||
text: '%i18n:@_remove.removed%'
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
save() {
|
||||
save(silent) {
|
||||
(this as any).api('admin/update-meta', {
|
||||
broadcasts: this.announcements
|
||||
}).then(() => {
|
||||
//(this as any).os.apis.dialog({ text: `Saved` });
|
||||
if (!silent) {
|
||||
this.$swal({
|
||||
type: 'success',
|
||||
text: '%i18n:@saved%'
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
//(this as any).os.apis.dialog({ text: `Failed ${e}` });
|
||||
this.$swal({
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -67,17 +67,24 @@ export default Vue.extend({
|
||||
(this as any).api('admin/emoji/add', {
|
||||
name: this.name,
|
||||
url: this.url,
|
||||
aliases: this.aliases.split(' ')
|
||||
aliases: this.aliases.split(' ').filter(x => x.length > 0)
|
||||
}).then(() => {
|
||||
//(this as any).os.apis.dialog({ text: `Added` });
|
||||
this.$swal({
|
||||
type: 'success',
|
||||
text: '%i18n:@add-emoji.added%'
|
||||
});
|
||||
this.fetchEmojis();
|
||||
}).catch(e => {
|
||||
//(this as any).os.apis.dialog({ text: `Failed ${e}` });
|
||||
this.$swal({
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
fetchEmojis() {
|
||||
(this as any).api('admin/emoji/list').then(emojis => {
|
||||
emojis.reverse();
|
||||
emojis.forEach(e => e.aliases = (e.aliases || []).join(' '));
|
||||
this.emojis = emojis;
|
||||
});
|
||||
@ -88,22 +95,42 @@ export default Vue.extend({
|
||||
id: emoji.id,
|
||||
name: emoji.name,
|
||||
url: emoji.url,
|
||||
aliases: emoji.aliases.split(' ')
|
||||
aliases: emoji.aliases.split(' ').filter(x => x.length > 0)
|
||||
}).then(() => {
|
||||
//(this as any).os.apis.dialog({ text: `Updated` });
|
||||
this.$swal({
|
||||
type: 'success',
|
||||
text: '%i18n:@updated%'
|
||||
});
|
||||
}).catch(e => {
|
||||
//(this as any).os.apis.dialog({ text: `Failed ${e}` });
|
||||
this.$swal({
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
removeEmoji(emoji) {
|
||||
(this as any).api('admin/emoji/remove', {
|
||||
id: emoji.id
|
||||
}).then(() => {
|
||||
//(this as any).os.apis.dialog({ text: `Removed` });
|
||||
this.fetchEmojis();
|
||||
}).catch(e => {
|
||||
//(this as any).os.apis.dialog({ text: `Failed ${e}` });
|
||||
this.$swal({
|
||||
type: 'warning',
|
||||
text: '%i18n:@remove-emoji.are-you-sure%'.replace('$1', emoji.name),
|
||||
showCancelButton: true
|
||||
}).then(res => {
|
||||
if (!res.value) return;
|
||||
|
||||
(this as any).api('admin/emoji/remove', {
|
||||
id: emoji.id
|
||||
}).then(() => {
|
||||
this.$swal({
|
||||
type: 'success',
|
||||
text: '%i18n:@remove-emoji.removed%'
|
||||
});
|
||||
this.fetchEmojis();
|
||||
}).catch(e => {
|
||||
this.$swal({
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
<ui-input v-model="name">%i18n:@instance-name%</ui-input>
|
||||
<ui-textarea v-model="description">%i18n:@instance-description%</ui-textarea>
|
||||
<ui-input v-model="bannerUrl">%i18n:@banner-url%</ui-input>
|
||||
<ui-input v-model="maxNoteTextLength">%i18n:@max-note-text-length%</ui-input>
|
||||
<ui-button @click="updateMeta">%i18n:@save%</ui-button>
|
||||
</section>
|
||||
</ui-card>
|
||||
@ -39,6 +40,7 @@ export default Vue.extend({
|
||||
bannerUrl: null,
|
||||
name: null,
|
||||
description: null,
|
||||
maxNoteTextLength: null,
|
||||
inviteCode: null,
|
||||
};
|
||||
},
|
||||
@ -48,6 +50,7 @@ export default Vue.extend({
|
||||
this.bannerUrl = meta.bannerUrl;
|
||||
this.name = meta.name;
|
||||
this.description = meta.description;
|
||||
this.maxNoteTextLength = meta.maxNoteTextLength;
|
||||
});
|
||||
},
|
||||
|
||||
@ -56,7 +59,10 @@ export default Vue.extend({
|
||||
(this as any).api('admin/invite').then(x => {
|
||||
this.inviteCode = x.code;
|
||||
}).catch(e => {
|
||||
//(this as any).os.apis.dialog({ text: `Failed ${e}` });
|
||||
this.$swal({
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@ -66,11 +72,18 @@ export default Vue.extend({
|
||||
disableLocalTimeline: this.disableLocalTimeline,
|
||||
bannerUrl: this.bannerUrl,
|
||||
name: this.name,
|
||||
description: this.description
|
||||
description: this.description,
|
||||
maxNoteTextLength: parseInt(this.maxNoteTextLength, 10)
|
||||
}).then(() => {
|
||||
//(this as any).os.apis.dialog({ text: `Saved` });
|
||||
this.$swal({
|
||||
type: 'success',
|
||||
text: '%i18n:@saved%'
|
||||
});
|
||||
}).catch(e => {
|
||||
//(this as any).os.apis.dialog({ text: `Failed ${e}` });
|
||||
this.$swal({
|
||||
type: 'error',
|
||||
text: e
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,8 @@
|
||||
</ol>
|
||||
<ol class="emojis" ref="suggests" v-if="emojis.length > 0">
|
||||
<li v-for="emoji in emojis" @click="complete(type, emoji.emoji)" @keydown="onKeydown" tabindex="-1">
|
||||
<span class="emoji" v-if="emoji.url"><img :src="emoji.url" :alt="emoji.emoji"/></span>
|
||||
<span class="emoji" v-if="emoji.isCustomEmoji"><img :src="emoji.url" :alt="emoji.emoji"/></span>
|
||||
<span class="emoji" v-else-if="!useOsDefaultEmojis"><img :src="emoji.url" :alt="emoji.emoji"/></span>
|
||||
<span class="emoji" v-else>{{ emoji.emoji }}</span>
|
||||
<span class="name" v-html="emoji.name.replace(q, `<b>${q}</b>`)"></span>
|
||||
<span class="alias" v-if="emoji.aliasOf">({{ emoji.aliasOf }})</span>
|
||||
@ -33,6 +34,7 @@ type EmojiDef = {
|
||||
name: string;
|
||||
aliasOf?: string;
|
||||
url?: string;
|
||||
isCustomEmoji?: boolean;
|
||||
};
|
||||
|
||||
const lib = Object.entries(emojilib.lib).filter((x: any) => {
|
||||
@ -42,7 +44,8 @@ const lib = Object.entries(emojilib.lib).filter((x: any) => {
|
||||
const emjdb: EmojiDef[] = lib.map((x: any) => ({
|
||||
emoji: x[1].char,
|
||||
name: x[0],
|
||||
aliasOf: null
|
||||
aliasOf: null,
|
||||
url: `https://twemoji.maxcdn.com/2/svg/${x[1].char.codePointAt(0).toString(16)}.svg`
|
||||
}));
|
||||
|
||||
lib.forEach((x: any) => {
|
||||
@ -51,7 +54,8 @@ lib.forEach((x: any) => {
|
||||
emjdb.push({
|
||||
emoji: x[1].char,
|
||||
name: k,
|
||||
aliasOf: x[0]
|
||||
aliasOf: x[0],
|
||||
url: `https://twemoji.maxcdn.com/2/svg/${x[1].char.codePointAt(0).toString(16)}.svg`
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -77,6 +81,10 @@ export default Vue.extend({
|
||||
computed: {
|
||||
items(): HTMLCollection {
|
||||
return (this.$refs.suggests as Element).children;
|
||||
},
|
||||
|
||||
useOsDefaultEmojis(): boolean {
|
||||
return this.$store.state.device.useOsDefaultEmojis;
|
||||
}
|
||||
},
|
||||
|
||||
@ -107,7 +115,8 @@ export default Vue.extend({
|
||||
emojiDefinitions.push({
|
||||
name: x.name,
|
||||
emoji: `:${x.name}:`,
|
||||
url: x.url
|
||||
url: x.url,
|
||||
isCustomEmoji: true
|
||||
});
|
||||
|
||||
if (x.aliases) {
|
||||
@ -116,7 +125,8 @@ export default Vue.extend({
|
||||
name: alias,
|
||||
aliasOf: x.name,
|
||||
emoji: `:${x.name}:`,
|
||||
url: x.url
|
||||
url: x.url,
|
||||
isCustomEmoji: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
81
src/client/app/common/views/components/emoji.vue
Normal file
81
src/client/app/common/views/components/emoji.vue
Normal file
@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<img v-if="customEmoji" class="fvgwvorwhxigeolkkrcderjzcawqrscl custom" :src="url" :alt="alt" :title="alt"/>
|
||||
<img v-else-if="char && !useOsDefaultEmojis" class="fvgwvorwhxigeolkkrcderjzcawqrscl" :src="url" :alt="alt" :title="alt"/>
|
||||
<span v-else-if="char && useOsDefaultEmojis">{{ char }}</span>
|
||||
<span v-else>:{{ name }}:</span>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { lib } from 'emojilib';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
emoji: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
customEmojis: {
|
||||
required: false,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
url: null,
|
||||
char: null,
|
||||
customEmoji: null
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
alt(): string {
|
||||
return this.customEmoji ? `:${this.customEmoji.name}:` : this.char;
|
||||
},
|
||||
|
||||
useOsDefaultEmojis(): boolean {
|
||||
return this.$store.state.device.useOsDefaultEmojis;
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
if (this.name) {
|
||||
const customEmoji = this.customEmojis.find(x => x.name == this.name);
|
||||
if (customEmoji) {
|
||||
this.customEmoji = customEmoji;
|
||||
this.url = customEmoji.url;
|
||||
} else {
|
||||
const emoji = lib[this.name];
|
||||
if (emoji) {
|
||||
this.char = emoji.char;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.char = this.emoji;
|
||||
}
|
||||
|
||||
if (this.char) {
|
||||
this.url = `https://twemoji.maxcdn.com/2/svg/${this.char.codePointAt(0).toString(16)}.svg`;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.fvgwvorwhxigeolkkrcderjzcawqrscl
|
||||
height 1em
|
||||
|
||||
&.custom
|
||||
height 2.5em
|
||||
vertical-align middle
|
||||
transition transform 0.2s ease
|
||||
|
||||
&:hover
|
||||
transform scale(1.2)
|
||||
|
||||
</style>
|
@ -39,6 +39,7 @@ import urlPreview from './url-preview.vue';
|
||||
import twitterSetting from './twitter-setting.vue';
|
||||
import githubSetting from './github-setting.vue';
|
||||
import fileTypeIcon from './file-type-icon.vue';
|
||||
import emoji from './emoji.vue';
|
||||
import Reversi from './games/reversi/reversi.vue';
|
||||
import welcomeTimeline from './welcome-timeline.vue';
|
||||
import uiInput from './ui/input.vue';
|
||||
@ -93,6 +94,7 @@ Vue.component('mk-url-preview', urlPreview);
|
||||
Vue.component('mk-twitter-setting', twitterSetting);
|
||||
Vue.component('mk-github-setting', githubSetting);
|
||||
Vue.component('mk-file-type-icon', fileTypeIcon);
|
||||
Vue.component('mk-emoji', emoji);
|
||||
Vue.component('mk-reversi', Reversi);
|
||||
Vue.component('mk-welcome-timeline', welcomeTimeline);
|
||||
Vue.component('ui-input', uiInput);
|
||||
|
@ -1,5 +1,4 @@
|
||||
import Vue, { VNode } from 'vue';
|
||||
import * as emojilib from 'emojilib';
|
||||
import { length } from 'stringz';
|
||||
import parse from '../../../../../mfm/parse';
|
||||
import getAcct from '../../../../../misc/acct/render';
|
||||
@ -188,24 +187,15 @@ export default Vue.component('misskey-flavored-markdown', {
|
||||
}
|
||||
|
||||
case 'emoji': {
|
||||
//#region カスタム絵文字
|
||||
if (this.customEmojis != null) {
|
||||
const customEmoji = this.customEmojis.find(e => e.name == token.emoji || (e.aliases || []).includes(token.emoji));
|
||||
if (customEmoji) {
|
||||
return [createElement('img', {
|
||||
attrs: {
|
||||
src: customEmoji.url,
|
||||
alt: token.emoji,
|
||||
title: token.emoji,
|
||||
style: 'height: 2.5em; vertical-align: middle;'
|
||||
}
|
||||
})];
|
||||
return [createElement('mk-emoji', {
|
||||
attrs: {
|
||||
emoji: token.emoji,
|
||||
name: token.name
|
||||
},
|
||||
props: {
|
||||
customEmojis: this.customEmojis
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
const emoji = emojilib.lib[token.emoji];
|
||||
return [createElement('span', emoji ? emoji.char : token.content)];
|
||||
})];
|
||||
}
|
||||
|
||||
case 'search': {
|
||||
|
@ -12,7 +12,11 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
export default Vue.extend({
|
||||
inject: ['horizonGrouped'],
|
||||
inject: {
|
||||
horizonGrouped: {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
|
@ -41,7 +41,11 @@ import Vue from 'vue';
|
||||
const getPasswordStrength = require('syuilo-password-strength');
|
||||
|
||||
export default Vue.extend({
|
||||
inject: ['horizonGrouped'],
|
||||
inject: {
|
||||
horizonGrouped: {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
required: false
|
||||
|
@ -145,6 +145,7 @@ class Autocomplete {
|
||||
} else {
|
||||
// サジェスト要素作成
|
||||
this.suggestion = new MkAutocomplete({
|
||||
parent: this.vm,
|
||||
propsData: {
|
||||
textarea: this.textarea,
|
||||
complete: this.complete,
|
||||
@ -222,8 +223,6 @@ class Autocomplete {
|
||||
const trimmedBefore = before.substring(0, before.lastIndexOf(':'));
|
||||
const after = source.substr(caret);
|
||||
|
||||
if (value.startsWith(':')) value = value + ' ';
|
||||
|
||||
// 挿入
|
||||
this.text = trimmedBefore + value + after;
|
||||
|
||||
|
@ -115,6 +115,7 @@
|
||||
<ui-switch v-model="reduceMotion">%i18n:common.reduce-motion%</ui-switch>
|
||||
<ui-switch v-model="contrastedAcct">%i18n:@contrasted-acct%</ui-switch>
|
||||
<ui-switch v-model="showFullAcct">%i18n:common.show-full-acct%</ui-switch>
|
||||
<ui-switch v-model="useOsDefaultEmojis">%i18n:common.use-os-default-emojis%</ui-switch>
|
||||
<ui-switch v-model="iLikeSushi">%i18n:common.i-like-sushi%</ui-switch>
|
||||
</section>
|
||||
<section>
|
||||
@ -324,6 +325,11 @@ export default Vue.extend({
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
useOsDefaultEmojis: {
|
||||
get() { return this.$store.state.device.useOsDefaultEmojis; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'useOsDefaultEmojis', value }); }
|
||||
},
|
||||
|
||||
reduceMotion: {
|
||||
get() { return this.$store.state.device.reduceMotion; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'reduceMotion', value }); }
|
||||
|
@ -23,6 +23,7 @@
|
||||
<ui-switch v-model="reduceMotion">%i18n:common.reduce-motion% (%i18n:common.this-setting-is-this-device-only%)</ui-switch>
|
||||
<ui-switch v-model="contrastedAcct">%i18n:@contrasted-acct%</ui-switch>
|
||||
<ui-switch v-model="showFullAcct">%i18n:common.show-full-acct%</ui-switch>
|
||||
<ui-switch v-model="useOsDefaultEmojis">%i18n:common.use-os-default-emojis%</ui-switch>
|
||||
<ui-switch v-model="iLikeSushi">%i18n:common.i-like-sushi%</ui-switch>
|
||||
<ui-switch v-model="disableAnimatedMfm">%i18n:common.disable-animated-mfm%</ui-switch>
|
||||
<ui-switch v-model="alwaysShowNsfw">%i18n:common.always-show-nsfw% (%i18n:common.this-setting-is-this-device-only%)</ui-switch>
|
||||
@ -199,6 +200,11 @@ export default Vue.extend({
|
||||
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }
|
||||
},
|
||||
|
||||
useOsDefaultEmojis: {
|
||||
get() { return this.$store.state.device.useOsDefaultEmojis; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'useOsDefaultEmojis', value }); }
|
||||
},
|
||||
|
||||
reduceMotion: {
|
||||
get() { return this.$store.state.device.reduceMotion; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'reduceMotion', value }); }
|
||||
|
@ -62,7 +62,8 @@ const defaultDeviceSettings = {
|
||||
deckColumnAlign: 'center',
|
||||
mobileNotificationPosition: 'bottom',
|
||||
deckTemporaryColumn: null,
|
||||
deckDefault: false
|
||||
deckDefault: false,
|
||||
useOsDefaultEmojis: false
|
||||
};
|
||||
|
||||
export default (os: MiOS) => new Vuex.Store({
|
||||
|
@ -49,8 +49,6 @@ export default function load() {
|
||||
if (config.localDriveCapacityMb == null) config.localDriveCapacityMb = 256;
|
||||
if (config.remoteDriveCapacityMb == null) config.remoteDriveCapacityMb = 8;
|
||||
|
||||
if (config.maxNoteTextLength == null) config.maxNoteTextLength = 1000;
|
||||
|
||||
return Object.assign(config, mixin);
|
||||
}
|
||||
|
||||
|
@ -107,8 +107,6 @@ export type Source = {
|
||||
engine: string;
|
||||
timeout: number;
|
||||
};
|
||||
|
||||
maxNoteTextLength?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -5,16 +5,29 @@
|
||||
export type TextElementEmoji = {
|
||||
type: 'emoji';
|
||||
content: string;
|
||||
emoji: string;
|
||||
emoji?: string;
|
||||
name?: string;
|
||||
};
|
||||
|
||||
const emojiRegex = /^[\u{1f300}-\u{1f5ff}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}\u{1f680}-\u{1f6ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f1e6}-\u{1f1ff}\u{1f191}-\u{1f251}\u{1f004}\u{1f0cf}\u{1f170}-\u{1f171}\u{1f17e}-\u{1f17f}\u{1f18e}\u{3030}\u{2b50}\u{2b55}\u{2934}-\u{2935}\u{2b05}-\u{2b07}\u{2b1b}-\u{2b1c}\u{3297}\u{3299}\u{303d}\u{00a9}\u{00ae}\u{2122}\u{23f3}\u{24c2}\u{23e9}-\u{23ef}\u{25b6}\u{23f8}-\u{23fa}]/ug;
|
||||
|
||||
export default function(text: string) {
|
||||
const match = text.match(/^:([a-zA-Z0-9+_-]+):/);
|
||||
if (!match) return null;
|
||||
const emoji = match[0];
|
||||
return {
|
||||
type: 'emoji',
|
||||
content: emoji,
|
||||
emoji: match[1]
|
||||
} as TextElementEmoji;
|
||||
const name = text.match(/^:([a-zA-Z0-9+_-]+):/);
|
||||
if (name) {
|
||||
return {
|
||||
type: 'emoji',
|
||||
content: name[0],
|
||||
name: name[1]
|
||||
} as TextElementEmoji;
|
||||
}
|
||||
const unicode = text.match(emojiRegex);
|
||||
if (unicode) {
|
||||
const [content] = unicode;
|
||||
return {
|
||||
type: 'emoji',
|
||||
content,
|
||||
emoji: content
|
||||
} as TextElementEmoji;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -43,4 +43,9 @@ export type IMeta = {
|
||||
disableLocalTimeline?: boolean;
|
||||
hidedTags?: string[];
|
||||
bannerUrl?: string;
|
||||
|
||||
/**
|
||||
* Max allowed note text length in charactors
|
||||
*/
|
||||
maxNoteTextLength?: number;
|
||||
};
|
||||
|
@ -11,7 +11,6 @@ import Reaction from './note-reaction';
|
||||
import { packMany as packFileMany, IDriveFile } from './drive-file';
|
||||
import Favorite from './favorite';
|
||||
import Following from './following';
|
||||
import config from '../config';
|
||||
import Emoji from './emoji';
|
||||
|
||||
const Note = db.get<INote>('notes');
|
||||
@ -27,10 +26,6 @@ Note.createIndex({ createdAt: -1 });
|
||||
Note.createIndex({ score: -1 }, { sparse: true });
|
||||
export default Note;
|
||||
|
||||
export function isValidText(text: string): boolean {
|
||||
return length(text.trim()) <= config.maxNoteTextLength && text.trim() != '';
|
||||
}
|
||||
|
||||
export function isValidCw(text: string): boolean {
|
||||
return length(text.trim()) <= 100;
|
||||
}
|
||||
|
@ -62,15 +62,6 @@ export default async (job: bq.Job, done: any): Promise<void> => {
|
||||
}) as IRemoteUser;
|
||||
}
|
||||
|
||||
//#region Log
|
||||
publishApLogStream({
|
||||
direction: 'in',
|
||||
activity: activity.type,
|
||||
host: user.host,
|
||||
actor: user.username
|
||||
});
|
||||
//#endregion
|
||||
|
||||
// Update activityの場合は、ここで署名検証/更新処理まで実施して終了
|
||||
if (activity.type === 'Update') {
|
||||
if (activity.object && activity.object.type === 'Person') {
|
||||
@ -101,6 +92,15 @@ export default async (job: bq.Job, done: any): Promise<void> => {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
//#region Log
|
||||
publishApLogStream({
|
||||
direction: 'in',
|
||||
activity: activity.type,
|
||||
host: user.host,
|
||||
actor: user.username
|
||||
});
|
||||
//#endregion
|
||||
|
||||
// アクティビティを処理
|
||||
try {
|
||||
|
@ -1,6 +0,0 @@
|
||||
import parse from '../../../mfm/parse';
|
||||
|
||||
export default function(text: string) {
|
||||
if (!text) return [];
|
||||
return parse(text).filter(t => t.type === 'emoji').map(t => (t as any).emoji);
|
||||
}
|
@ -8,9 +8,7 @@ import Note, { INote } from '../../../models/note';
|
||||
import User from '../../../models/user';
|
||||
import toHtml from '../misc/get-note-html';
|
||||
import parseMfm from '../../../mfm/parse';
|
||||
import getEmojiNames from '../misc/get-emoji-names';
|
||||
import Emoji, { IEmoji } from '../../../models/emoji';
|
||||
import { unique } from '../../../prelude/array';
|
||||
|
||||
export default async function renderNote(note: INote, dive = true): Promise<any> {
|
||||
const promisedFiles: Promise<IDriveFile[]> = note.fileIds
|
||||
@ -110,8 +108,7 @@ export default async function renderNote(note: INote, dive = true): Promise<any>
|
||||
|
||||
const content = toHtml(Object.assign({}, note, { text }));
|
||||
|
||||
const emojiNames = unique(getEmojiNames(content));
|
||||
const emojis = await getEmojis(emojiNames);
|
||||
const emojis = await getEmojis(note.emojis);
|
||||
const apemojis = emojis.map(emoji => renderEmoji(emoji));
|
||||
|
||||
const tag = [
|
||||
@ -141,12 +138,10 @@ async function getEmojis(names: string[]): Promise<IEmoji[]> {
|
||||
if (names == null || names.length < 1) return [];
|
||||
|
||||
const emojis = await Promise.all(
|
||||
names.map(async name => {
|
||||
return await Emoji.findOne({
|
||||
name,
|
||||
host: null
|
||||
});
|
||||
})
|
||||
names.map(name => Emoji.findOne({
|
||||
name,
|
||||
host: null
|
||||
}))
|
||||
);
|
||||
|
||||
return emojis.filter(emoji => emoji != null);
|
||||
|
@ -12,15 +12,15 @@ export const meta = {
|
||||
|
||||
params: {
|
||||
name: {
|
||||
validator: $.str
|
||||
validator: $.str.min(1)
|
||||
},
|
||||
|
||||
url: {
|
||||
validator: $.str
|
||||
validator: $.str.min(1)
|
||||
},
|
||||
|
||||
aliases: {
|
||||
validator: $.arr($.str).optional,
|
||||
validator: $.arr($.str.min(1)).optional,
|
||||
default: [] as string[]
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,13 @@ export const meta = {
|
||||
'ja-JP': 'インスタンスの紹介文'
|
||||
}
|
||||
},
|
||||
|
||||
maxNoteTextLength: {
|
||||
validator: $.num.optional.min(1),
|
||||
desc: {
|
||||
'ja-JP': '投稿の最大文字数'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -93,6 +100,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
set.description = ps.description;
|
||||
}
|
||||
|
||||
if (ps.maxNoteTextLength) {
|
||||
set.maxNoteTextLength = ps.maxNoteTextLength;
|
||||
}
|
||||
|
||||
await Meta.update({}, {
|
||||
$set: set
|
||||
}, { upsert: true });
|
||||
|
@ -62,7 +62,7 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
|
||||
swPublickey: config.sw ? config.sw.public_key : null,
|
||||
hidedTags: (me && me.isAdmin) ? met.hidedTags : undefined,
|
||||
bannerUrl: met.bannerUrl,
|
||||
maxNoteTextLength: config.maxNoteTextLength,
|
||||
maxNoteTextLength: met.maxNoteTextLength || 1000,
|
||||
|
||||
emojis: emojis,
|
||||
|
||||
|
@ -1,10 +1,20 @@
|
||||
import $ from 'cafy'; import ID, { transform, transformMany } from '../../../../misc/cafy-id';
|
||||
const ms = require('ms');
|
||||
import Note, { INote, isValidText, isValidCw, pack } from '../../../../models/note';
|
||||
import { length } from 'stringz';
|
||||
import Note, { INote, isValidCw, pack } from '../../../../models/note';
|
||||
import User, { IUser } from '../../../../models/user';
|
||||
import DriveFile, { IDriveFile } from '../../../../models/drive-file';
|
||||
import create from '../../../../services/note/create';
|
||||
import define from '../../define';
|
||||
import Meta from '../../../../models/meta';
|
||||
|
||||
let maxNoteTextLength = 1000;
|
||||
|
||||
setInterval(() => {
|
||||
Meta.findOne({}).then(m => {
|
||||
if (m.maxNoteTextLength) maxNoteTextLength = m.maxNoteTextLength;
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
export const meta = {
|
||||
stability: 'stable',
|
||||
@ -40,7 +50,9 @@ export const meta = {
|
||||
},
|
||||
|
||||
text: {
|
||||
validator: $.str.optional.nullable.pipe(isValidText),
|
||||
validator: $.str.optional.nullable.pipe(text =>
|
||||
length(text.trim()) <= maxNoteTextLength && text.trim() != ''
|
||||
),
|
||||
default: null as any,
|
||||
desc: {
|
||||
'ja-JP': '投稿内容'
|
||||
|
35
src/server/api/mastodon/emoji.ts
Normal file
35
src/server/api/mastodon/emoji.ts
Normal file
@ -0,0 +1,35 @@
|
||||
export type IMastodonEmoji = {
|
||||
shortcode: string,
|
||||
url: string,
|
||||
static_url: string,
|
||||
visible_in_picker: boolean
|
||||
};
|
||||
|
||||
export async function toMastodonEmojis(emoji: any): Promise<IMastodonEmoji[]> {
|
||||
return [{
|
||||
shortcode: emoji.name,
|
||||
url: emoji.url,
|
||||
static_url: emoji.url, // TODO: Implement ensuring static emoji
|
||||
visible_in_picker: true
|
||||
}, ...(emoji.aliases as string[] || []).map(x => ({
|
||||
shortcode: x,
|
||||
url: emoji.url,
|
||||
static_url: emoji.url,
|
||||
visible_in_picker: true
|
||||
}))];
|
||||
}
|
||||
|
||||
export function toMisskeyEmojiSync(emoji: IMastodonEmoji) {
|
||||
return {
|
||||
name: emoji.shortcode,
|
||||
url: emoji.url
|
||||
};
|
||||
}
|
||||
|
||||
export function toMisskeyEmojiWithAliasesSync(emoji: IMastodonEmoji, ...aliases: string[]) {
|
||||
return {
|
||||
name: emoji.shortcode,
|
||||
aliases,
|
||||
url: emoji.url
|
||||
};
|
||||
}
|
@ -1,15 +1,22 @@
|
||||
import * as Router from 'koa-router';
|
||||
import User from '../../models/user';
|
||||
import User from '../../../models/user';
|
||||
import { toASCII } from 'punycode';
|
||||
import config from '../../config';
|
||||
import Meta from '../../models/meta';
|
||||
import config from '../../../config';
|
||||
import Meta from '../../../models/meta';
|
||||
import { ObjectID } from 'bson';
|
||||
const pkg = require('../../../package.json');
|
||||
import Emoji from '../../../models/emoji';
|
||||
import { toMastodonEmojis } from './emoji';
|
||||
const pkg = require('../../../../package.json');
|
||||
|
||||
// Init router
|
||||
const router = new Router();
|
||||
|
||||
router.get('/v1/custom_emojis', async ctx => ctx.body = {});
|
||||
router.get('/v1/custom_emojis', async ctx => ctx.body =
|
||||
(await Emoji.find({ host: null }, {
|
||||
fields: {
|
||||
_id: false
|
||||
}
|
||||
})).map(x => toMastodonEmojis(x)));
|
||||
|
||||
router.get('/v1/instance', async ctx => { // TODO: This is a temporary implementation. Consider creating helper methods!
|
||||
const meta = await Meta.findOne() || {};
|
||||
@ -34,6 +41,11 @@ router.get('/v1/instance', async ctx => { // TODO: This is a temporary implement
|
||||
notesCount: 0
|
||||
};
|
||||
const acct = maintainer.host ? `${maintainer.username}@${maintainer.host}` : maintainer.username;
|
||||
const emojis = (await Emoji.find({ host: null }, {
|
||||
fields: {
|
||||
_id: false
|
||||
}
|
||||
})).map(toMastodonEmojis);
|
||||
|
||||
ctx.body = {
|
||||
uri: config.hostname,
|
||||
@ -73,7 +85,7 @@ router.get('/v1/instance', async ctx => { // TODO: This is a temporary implement
|
||||
followers_count: maintainer.followersCount,
|
||||
following_count: maintainer.followingCount,
|
||||
statuses_count: maintainer.notesCount,
|
||||
emojis: [],
|
||||
emojis: emojis,
|
||||
moved: null,
|
||||
fields: null
|
||||
}
|
@ -109,7 +109,7 @@ if (!config.github || !redis) {
|
||||
}
|
||||
|
||||
const params = {
|
||||
redirect_uri: `${config.url}:8089/api/gh/cb`,
|
||||
redirect_uri: `${config.url}/api/gh/cb`,
|
||||
scope: ['read:user'],
|
||||
state: uuid()
|
||||
};
|
||||
@ -122,7 +122,7 @@ if (!config.github || !redis) {
|
||||
const sessid = uuid();
|
||||
|
||||
const params = {
|
||||
redirect_uri: `${config.url}:8089/api/gh/cb`,
|
||||
redirect_uri: `${config.url}/api/gh/cb`,
|
||||
scope: ['read:user'],
|
||||
state: uuid()
|
||||
};
|
||||
|
@ -456,8 +456,8 @@ function extractHashtags(tokens: ReturnType<typeof parse>): string[] {
|
||||
function extractEmojis(tokens: ReturnType<typeof parse>): string[] {
|
||||
// Extract emojis
|
||||
const emojis = tokens
|
||||
.filter(t => t.type == 'emoji')
|
||||
.map(t => (t as TextElementEmoji).emoji)
|
||||
.filter(t => t.type == 'emoji' && t.name)
|
||||
.map(t => (t as TextElementEmoji).name)
|
||||
.filter(emoji => emoji.length <= 100);
|
||||
|
||||
return unique(emojis);
|
||||
|
15
test/mfm.ts
15
test/mfm.ts
@ -16,7 +16,7 @@ describe('Text', () => {
|
||||
{ type: 'text', content: ' '},
|
||||
{ type: 'mention', content: '@hima_sub@namori.net', canonical: '@hima_sub@namori.net', username: 'hima_sub', host: 'namori.net' },
|
||||
{ type: 'text', content: ' お腹ペコい ' },
|
||||
{ type: 'emoji', content: ':cat:', emoji: 'cat'},
|
||||
{ type: 'emoji', content: ':cat:', name: 'cat'},
|
||||
{ type: 'text', content: ' '},
|
||||
{ type: 'hashtag', content: '#yryr', hashtag: 'yryr' }
|
||||
], tokens);
|
||||
@ -182,15 +182,20 @@ describe('Text', () => {
|
||||
it('emoji', () => {
|
||||
const tokens1 = analyze(':cat:');
|
||||
assert.deepEqual([
|
||||
{ type: 'emoji', content: ':cat:', emoji: 'cat'}
|
||||
{ type: 'emoji', content: ':cat:', name: 'cat' }
|
||||
], tokens1);
|
||||
|
||||
const tokens2 = analyze(':cat::cat::cat:');
|
||||
assert.deepEqual([
|
||||
{ type: 'emoji', content: ':cat:', emoji: 'cat'},
|
||||
{ type: 'emoji', content: ':cat:', emoji: 'cat'},
|
||||
{ type: 'emoji', content: ':cat:', emoji: 'cat'}
|
||||
{ type: 'emoji', content: ':cat:', name: 'cat' },
|
||||
{ type: 'emoji', content: ':cat:', name: 'cat' },
|
||||
{ type: 'emoji', content: ':cat:', name: 'cat' }
|
||||
], tokens2);
|
||||
|
||||
const tokens3 = analyze('🍎');
|
||||
assert.deepEqual([
|
||||
{ type: 'emoji', content: '🍎', emoji: '🍎' }
|
||||
], tokens3);
|
||||
});
|
||||
|
||||
it('block code', () => {
|
||||
|
Reference in New Issue
Block a user