Skip to content

Commit

Permalink
Reformat assembly code display in AddressCodeTab (#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteAtATime committed Apr 4, 2024
1 parent 601ca8f commit d1ade4c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ type AddressCodeTabProps = {
};

export const AddressCodeTab = ({ bytecode, assembly }: AddressCodeTabProps) => {
const formattedAssembly = assembly.split(" ").join("\n");
const formattedAssembly = Array.from(assembly.matchAll(/\w+( 0x[a-fA-F0-9]+)?/g))
.map(it => it[0])
.join("\n");

return (
<div className="flex flex-col gap-3 p-4">
Expand Down

0 comments on commit d1ade4c

Please sign in to comment.