File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -94,13 +94,11 @@ export default defineComponent({
9494 .map (query => query .replace .message )
9595 })
9696 const setMessagePlaceHolder = () => {
97- // check if user modified the placeholder, if that is the case, do not update the message
98- const messagePlaceHolderRegex = / ^ If you use this (?<cfftype >software| dataset), please cite it using the metadata from this file. $ / igd
99- const isMessageModifiedByApp = messagePlaceHolderRegex .exec (message .value )
100- const testing = messagePlaceHolderRegex .test (message .value )
101- console .log (testing )
102- if (isMessageModifiedByApp ) {
103- setMessage (` If you use this ${type .value }, please cite it using the metadata from this file. ` )
97+ const messagePlaceHolderRegex = / (software| dataset)/ igm
98+ const matches = messagePlaceHolderRegex .exec (message .value )
99+ if (matches ) {
100+ // search and replace all occurrences
101+ setMessage (message .value .split (matches [0 ]).join (type .value ))
104102 }
105103 }
106104 return {
You can’t perform that action at this time.
0 commit comments