summaryrefslogtreecommitdiff
path: root/src/text/parse/elements/search.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/text/parse/elements/search.ts')
-rw-r--r--src/text/parse/elements/search.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/text/parse/elements/search.ts b/src/text/parse/elements/search.ts
new file mode 100644
index 0000000000..12ee8ecbb8
--- /dev/null
+++ b/src/text/parse/elements/search.ts
@@ -0,0 +1,13 @@
+/**
+ * Search
+ */
+
+module.exports = text => {
+ const match = text.match(/^(.+?) 検索(\n|$)/);
+ if (!match) return null;
+ return {
+ type: 'search',
+ content: match[0],
+ query: match[1]
+ };
+};