Skip to content

Commit 8c6039e

Browse files
authored
fix: argument parsing with quotes (#16)
1 parent 3e8fd34 commit 8c6039e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

transform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function run(argv) {
44
const input = argv[0];
55

66
const WORD = /[a-zA-Z0-9а-яёєґїА-ЯЁЄҐЇ]+/g;
7-
const ARGUMENT = /(?:'([^'"]*)'|"([^'"]*)")/g;
7+
const ARGUMENT = /(?:'([^']*)'|"([^"]*)")/g;
88
const COMMAND_SEPARATOR = ' /';
99
const CYRILLIC_TO_LATIN_MAP = {
1010
а: 'a',
@@ -84,7 +84,7 @@ function run(argv) {
8484
let items = [];
8585

8686
const transliterate = (string = '') => {
87-
return string.replace(/[а-яёА-ЯЁ]/g, (match) => CYRILLIC_TO_LATIN_MAP[match] || match);
87+
return string.replace(/[а-яёєґїА-ЯЁЄҐЇ]/g, (match) => CYRILLIC_TO_LATIN_MAP[match] || match);
8888
};
8989

9090
const toPascalCase = (string = '') => {

0 commit comments

Comments
 (0)