Skip to content

Commit

Permalink
feat(cmd): add need-to-sanitize-html flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Feverqwe authored and 3y3 committed Jan 26, 2024
1 parent c5d927a commit 22957d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cmd/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ function builder<T>(argv: Argv<T>) {
type: 'boolean',
group: 'Build options:',
})
.option('need-to-sanitize-html', {
default: true,
describe: 'Enable sanitize html',
type: 'boolean',
group: 'Build options:',
})
.check(argvValidator)
.example('yfm -i ./input -o ./output', '')
.demandOption(
Expand Down
1 change: 1 addition & 0 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ interface YfmConfig {
resources?: Resources;
yandexCloudTranslateFolderId: string;
yandexCloudTranslateGlossaryPairs: YandexCloudTranslateGlossaryPair[];
needToSanitizeHtml: boolean;
}

export interface YfmArgv extends YfmConfig {
Expand Down

0 comments on commit 22957d8

Please sign in to comment.