diff --git a/src/components/viewers/ViewerCustom.vue b/src/components/viewers/ViewerCustom.vue index 8f4b53bfd..9f2b372ec 100644 --- a/src/components/viewers/ViewerCustom.vue +++ b/src/components/viewers/ViewerCustom.vue @@ -104,11 +104,11 @@ export default { } this.fullCommand = this.fullCommand - .replace('{HEX}', '') - .replace('{HEX_FILE}', filePath); + .replace('{HEX_FILE}', filePath) + .replace('{HEX}', ''); this.previewCommand = this.previewCommand - .replace('{HEX}', '') - .replace('{HEX_FILE}', filePath); + .replace('{HEX_FILE}', filePath) + .replace('{HEX}', ''); this.exec(); }); @@ -117,17 +117,16 @@ export default { // common content just exec else { this.fullCommand = this.fullCommand - .replace('{HEX_FILE}', '') - .replace( - '{HEX}', - hexStr, - ); + .replace('{HEX}', hexStr) + .replace('{HEX_FILE}', ''); + this.previewCommand = this.previewCommand - .replace('{HEX_FILE}', '') .replace( - '{HEX}', - this.$util.cutString(hexStr, this.previewContentMax), - ); + '{HEX}', + this.$util.cutString(hexStr, this.previewContentMax), + ) + .replace('{HEX_FILE}', ''); + this.exec(); } },