summaryrefslogtreecommitdiff
path: root/src/text/parse/elements/search.ts
blob: 12ee8ecbb88c722e08d995ac8dfc02791061d802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
 * Search
 */

module.exports = text => {
	const match = text.match(/^(.+?) 検索(\n|$)/);
	if (!match) return null;
	return {
		type: 'search',
		content: match[0],
		query: match[1]
	};
};