diff --git a/src/components/output/EsTreePanel.vue b/src/components/output/EsTreePanel.vue index dbc5bd4..7044d09 100644 --- a/src/components/output/EsTreePanel.vue +++ b/src/components/output/EsTreePanel.vue @@ -22,7 +22,11 @@ const value = computed(() => { }) const code = computed(() => { - return JSON.stringify(value.value, undefined, 2) + // Trim off first and last lines which contain `{"node":` and `,"fixes":[]}` + let json = oxc.value.astJson + json = json.slice(json.indexOf('\n') + 1) + json = json.slice(0, json.lastIndexOf('\n')) + return json })