Skip to content

Commit 416801e

Browse files
committed
Improve find & replace tool
1 parent 55ead5e commit 416801e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

commands/find-replace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const setup = (sywac) => {
3434
});
3535
sywac.array('--where', {
3636
defaultValue: 'mobiledoc',
37-
choices: ['all', 'mobiledoc', 'title', 'slug', 'custom_excerpt', 'meta_title', 'meta_description', 'twitter_title', 'twitter_description', 'og_title', 'og_description'],
37+
choices: ['all', 'mobiledoc', 'html', 'lexical', 'title', 'slug', 'custom_excerpt', 'meta_title', 'meta_description', 'twitter_title', 'twitter_description', 'og_title', 'og_description'],
3838
desc: 'Where to perform the find & replace (comma separated, eg: mobiledoc,title,meta_title)'
3939
});
4040
sywac.number('--delayBetweenCalls', {

tasks/find-replace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const initialise = (options) => {
2626
ctx.posts = [];
2727
ctx.toUpdate = [];
2828
ctx.updated = [];
29-
ctx.regex = new RegExp(ctx.args.find, 'g');
29+
ctx.regex = new RegExp(ctx.args.find, 'gmi');
3030

3131
task.output = `Initialised API connection for ${options.apiURL}`;
3232
}

0 commit comments

Comments
 (0)