n313893254 2019-03-01 14:29:03 +08:00
parent 08dc5d9a30
commit d7464d334f
2 changed files with 4 additions and 5 deletions

View File

@ -121,7 +121,7 @@ export default Component.extend(ThrottledResize, {
deepStrs.map((s) => { deepStrs.map((s) => {
str += s str += s
}) })
const out = `<match *>\n${ body }${ str }</match>` const out = `<match *>\n${ body } ${ str }\n</match>`
this.send('updateValue', out) this.send('updateValue', out)
}), }),
@ -290,7 +290,7 @@ ${ fieldsStr }
parseValue(value = '') { parseValue(value = '') {
let fileObj = {} let fileObj = {}
const removeMacth = value.replace(/.*<match.*>(\r\n|\n|\r) {2}/ig, '').replace(/(\r\n|\n|\r).*<\/match.*>/ig, '') const removeMacth = value.replace(/.*<match.*>.*(\r\n|\n|\r) {2}/ig, '').replace(/(\r\n|\n|\r).*<\/match.*>/ig, '')
const deepStrs = removeMacth.match(/<(.|\r\n|\n|\r)*<\/.*>/ig, '') || [] const deepStrs = removeMacth.match(/<(.|\r\n|\n|\r)*<\/.*>/ig, '') || []
const removedDeep = removeMacth.replace(/<(.|\r\n|\n|\r)*<\/.*>/ig, '') const removedDeep = removeMacth.replace(/<(.|\r\n|\n|\r)*<\/.*>/ig, '')

View File

@ -194,8 +194,7 @@ export default Component.extend(NewOrEdit, {
parseValue: computed('customContent', function() { parseValue: computed('customContent', function() {
let fileObj = {} let fileObj = {}
const removeMacth = get(this, 'customContent').replace(/.*<match.*>(\r\n|\n|\r) {2}/ig, '').replace(/(\r\n|\n|\r).*<\/match.*>/ig, '') const removeMacth = get(this, 'customContent').replace(/.*<match.*>.*(\r\n|\n|\r) {2}/ig, '').replace(/(\r\n|\n|\r).*<\/match.*>/ig, '')
const deepStrs = removeMacth.match(/<(.|\r\n|\n|\r)*<\/.*>/ig, '') || [] const deepStrs = removeMacth.match(/<(.|\r\n|\n|\r)*<\/.*>/ig, '') || []
const removedDeep = removeMacth.replace(/<(.|\r\n|\n|\r)*<\/.*>/ig, '') const removedDeep = removeMacth.replace(/<(.|\r\n|\n|\r)*<\/.*>/ig, '')
@ -256,7 +255,7 @@ export default Component.extend(NewOrEdit, {
clientKey: get(this, 'model.customTarget.config.clientKey'), clientKey: get(this, 'model.customTarget.config.clientKey'),
clientCert: get(this, 'model.customTarget.config.clientCert'), clientCert: get(this, 'model.customTarget.config.clientCert'),
certificate: get(this, 'model.customTarget.config.certificate'), certificate: get(this, 'model.customTarget.config.certificate'),
content: (get(this, 'customContent') || '').replace(/.*<match.*>(\r\n|\n|\r) {2}/ig, '').replace(/(\r\n|\n|\r).*<\/match.*>/ig, ''), content: (get(this, 'customContent') || '').replace(/.*<match.*>.*(\r\n|\n|\r) {2}/ig, '').replace(/(\r\n|\n|\r).*<\/match.*>/ig, ''),
} }
}) })