Skip to content

Commit

Permalink
pusha-and-popa-in-editor
Browse files Browse the repository at this point in the history
Signed-off-by: yzamir <[email protected]>
  • Loading branch information
yaacov committed Oct 6, 2023
1 parent 3f2b999 commit 9f35022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/components/code-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class CodeEditor extends HTMLElement {
highlightText() {
const text = this.editor.innerHTML;
const highlightedText = text
.replace(/(SHRB|JUMP|JZA|JZB|ADDA|ADDB|END|DATA|POP|PUSH|CALL|RET|LOADABP|STOREABP)([^:])/gi, '<span class="code">$1</span>$2')
.replace(/(SHRB|JUMP|JZA|JZB|ADDA|ADDB|END|DATA|POPA|PUSHA|CALL|RET|LOADABP|STOREABP)([^:])/gi, '<span class="code">$1</span>$2')
.replace(/(NOP|LOADA|LOADB|STOREA|STOREB|ORA|ORB|ANDA|ANDB|XORA|XORB|NOTA|NOTB|SHLA|SHLB|SHRA)([^:])/gi, '<span class="code">$1</span>$2')
.replace(/(0x[\da-fA-F]{2})/g, '<span class="literal">$1</span>')
.replace(/(^|<br>)(\s*\w+:)/g, '$1<span class="label">$2</span>')
Expand Down

0 comments on commit 9f35022

Please sign in to comment.