Skip to content

Commit

Permalink
fix: copy log ansi character parsing and html decode (#2621)
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-ramaswamy authored Dec 23, 2023
1 parent 9e5b6a8 commit 7a0fc84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion assets/components/LogViewer/SimpleLogItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
></div>
<log-message-actions
class="duration-250 absolute -right-1 opacity-0 transition-opacity delay-150 group-hover/entry:opacity-100"
:message="logEntry.message"
:message="decodeXML(stripAnsi(logEntry.message))"
:log-entry="logEntry"
/>
</div>
</template>
<script lang="ts" setup>
import { SimpleLogEntry } from "@/models/LogEntry";
import AnsiConvertor from "ansi-to-html";
import stripAnsi from "strip-ansi";
import { decodeXML } from "entities";
const ansiConvertor = new AnsiConvertor({ escapeXML: false, fg: "var(--text-color)" });
defineProps<{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"postcss": "^8.4.32",
"postcss-mixins": "^9.0.4",
"splitpanes": "^3.1.5",
"strip-ansi": "^7.1.0",
"tailwindcss": "^3.4.0",
"unplugin-auto-import": "^0.17.2",
"unplugin-icons": "^0.18.1",
Expand Down
5 changes: 3 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a0fc84

Please sign in to comment.