File tree Expand file tree Collapse file tree
apps/roam/src/components/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1069,20 +1069,7 @@ const DiscourseRelationConfigPanel: CustomField["options"]["component"] = ({
10691069 setGlobalSetting ( [ "Relations" ] , remaining ) ;
10701070 } ;
10711071 const handleDuplicate = ( rel : Relation ) => {
1072- const baseText = rel . text
1073- . split ( " " )
1074- . filter ( ( s ) => ! / ^ \( \d + \) $ / . test ( s ) )
1075- . join ( " " ) ;
1076- const copy = relations . reduce ( ( p , c ) => {
1077- if ( c . text . startsWith ( baseText ) ) {
1078- const copyIndex = Number ( / \( ( \d + ) \) $ / . exec ( c . text ) ?. [ 1 ] ) ;
1079- if ( copyIndex && copyIndex > p ) {
1080- return copyIndex ;
1081- }
1082- }
1083- return p ;
1084- } , 0 ) ;
1085- const text = `${ rel . text } (${ copy + 1 } )` ;
1072+ const text = rel . text ;
10861073 const copyTree = getBasicTreeByParentUid ( rel . uid ) ;
10871074 const stripUid = ( n : RoamBasicNode [ ] ) : InputTextNode [ ] =>
10881075 n . map ( ( c ) => ( {
You can’t perform that action at this time.
0 commit comments