Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
explorer web: wrap long function calls
Browse files Browse the repository at this point in the history
fariss committed Oct 6, 2024
1 parent 41c5194 commit 79b1263
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/explorer/src/components/RuleMatchesTable.vue
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@

<!-- Source code dialog -->
<Dialog v-model:visible="sourceDialogVisible" style="width: 50vw">
<highlightjs autodetect :code="currentSource" />
<highlightjs :autodetect="false" language="yaml" :code="currentSource" />
</Dialog>
</template>

15 changes: 14 additions & 1 deletion web/explorer/src/components/columns/RuleColumn.vue
Original file line number Diff line number Diff line change
@@ -55,7 +55,12 @@

<!-- example node: "exit(0) -> 0" (if the node type is call-info, we highlight node.data.name.callInfo) -->
<template v-else-if="node.data.type === 'call-info'">
<highlightjs lang="c" :code="node.data.name.callInfo" class="text-xs" />
<highlightjs
:autodetect="false"
language="c"
:code="node.data.name.callInfo"
class="text-xs highlightjs-wrapper"
/>
</template>

<!-- example node: " = IMAGE_NT_SIGNATURE (PE)" -->
@@ -83,3 +88,11 @@ const getTooltipContent = (data) => {
return null;
};
</script>

<style scoped>
.highlightjs-wrapper {
width: 120ch;
word-wrap: break-word;
white-space: normal;
}
</style>

0 comments on commit 79b1263

Please sign in to comment.