mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 00:58:32 +02:00
URL path placeholders
This commit is contained in:
@@ -42,12 +42,13 @@ export function BulkPairEditor({
|
||||
);
|
||||
}
|
||||
|
||||
function lineToPair(l: string): PairEditorProps['pairs'][0] {
|
||||
const [name, ...values] = l.split(':');
|
||||
function lineToPair(line: string): PairEditorProps['pairs'][0] {
|
||||
const [, name, value] = line.match(/^(:?[^:]+):\s+([^$]*)/) ?? [];
|
||||
|
||||
const pair: PairEditorProps['pairs'][0] = {
|
||||
enabled: true,
|
||||
name: (name ?? '').trim(),
|
||||
value: values.join(':').trim(),
|
||||
value: (value ?? '').trim(),
|
||||
};
|
||||
return pair;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user