Add search syntax
This commit is contained in:
parent
3c80f0eaca
commit
441796f845
4 changed files with 95 additions and 0 deletions
13
src/text/parse/elements/search.ts
Normal file
13
src/text/parse/elements/search.ts
Normal file
|
|
@ -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]
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue