88 *
99 * Walks through each exception and prompts for an action:
1010 *
11- * https://... — Add the URL as spec_url (comma -separated for multiple)
11+ * https://... — Add the URL as spec_url (space -separated for multiple)
1212 * f / false — Set standard_track to false (includes all subfeatures)
1313 * p — Copy the parent feature's spec_url
1414 * p=https://.. — Set spec_url on both the parent and this subfeature
@@ -216,12 +216,12 @@ const fetchXrefSuggestions = async (
216216
217217const instructions = `
218218 ${ styleText ( 'bold' , 'Actions:' ) }
219- ${ styleText ( 'cyan' , 'https://...' ) } Add the URL as spec_url (comma -separated for multiple)
219+ ${ styleText ( 'cyan' , 'https://...' ) } Add the URL as spec_url (space -separated for multiple)
220220 ${ styleText ( 'cyan' , '1-9' ) } Accept a numbered suggestion
221221 ${ styleText ( 'cyan' , 'x' ) } Fetch xref suggestions for the current feature
222222 ${ styleText ( 'cyan' , 'x <term>' ) } Fetch xref suggestions for a custom search term
223223 ${ styleText ( 'cyan' , 'p' ) } Use parent feature's spec_url
224- ${ styleText ( 'cyan' , 'p, https://...' ) } Use parent spec_url + extra URL on this subfeature
224+ ${ styleText ( 'cyan' , 'p https://...' ) } Use parent spec_url + extra URL on this subfeature
225225 ${ styleText ( 'cyan' , 'p=https://...' ) } Set spec_url on parent + this subfeature
226226 ${ styleText ( 'cyan' , 'f' ) } Set standard_track to false (+ all subfeatures)
227227 ${ styleText ( 'cyan' , 'r' ) } Repeat the previous action
@@ -548,15 +548,12 @@ while (idx < exceptions.length) {
548548 break ;
549549 }
550550
551- if ( answer . startsWith ( 'p, https://' ) ) {
551+ if ( answer . startsWith ( 'p https://' ) ) {
552552 if ( ! ancestor ) {
553553 console . log ( styleText ( 'red' , ' No ancestor with spec_url found.' ) ) ;
554554 continue ;
555555 }
556- const extra = answer
557- . slice ( 2 )
558- . split ( ',' )
559- . map ( ( u ) => u . trim ( ) ) ;
556+ const extra = answer . slice ( 2 ) . trim ( ) . split ( / \s + / ) ;
560557 const specUrl = [ ...[ ancestor . spec_url ] . flat ( ) , ...extra ] ;
561558 updateFeatures ( [ featurePath ] , ( c ) => {
562559 c . spec_url = specUrl ;
@@ -582,8 +579,7 @@ while (idx < exceptions.length) {
582579 }
583580
584581 if ( answer . startsWith ( 'p=https://' ) ) {
585- const raw = answer . slice ( 2 ) ;
586- const urls = raw . split ( ',' ) . map ( ( u ) => u . trim ( ) ) ;
582+ const urls = answer . slice ( 2 ) . trim ( ) . split ( / \s + / ) ;
587583 const specUrl = urls . length === 1 ? urls [ 0 ] : urls ;
588584 const parentPath = featurePath . split ( '.' ) . slice ( 0 , - 1 ) . join ( '.' ) ;
589585 updateFeatures ( [ parentPath ] , ( c ) => {
@@ -647,7 +643,7 @@ while (idx < exceptions.length) {
647643 }
648644
649645 if ( answer . startsWith ( 'https://' ) ) {
650- const urls = answer . split ( ',' ) . map ( ( u ) => u . trim ( ) ) ;
646+ const urls = answer . split ( / \s + / ) ;
651647 const specUrl = urls . length === 1 ? urls [ 0 ] : urls ;
652648 updateFeatures ( [ featurePath ] , ( c ) => {
653649 c . spec_url = specUrl ;
0 commit comments