mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-18 08:25:36 +02:00
[noImplicitAny: true] src/text
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
* Search
|
||||
*/
|
||||
|
||||
module.exports = text => {
|
||||
export type TextElementSearch = {
|
||||
type: "search"
|
||||
content: string
|
||||
query: string
|
||||
};
|
||||
|
||||
export default function(text: string) {
|
||||
const match = text.match(/^(.+?) 検索(\n|$)/);
|
||||
if (!match) return null;
|
||||
return {
|
||||
@@ -10,4 +16,4 @@ module.exports = text => {
|
||||
content: match[0],
|
||||
query: match[1]
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user