Skip to content

Commit

Permalink
fix: crash on yaml highlighting
Browse files Browse the repository at this point in the history
Fixed the function import in the same way as in #5421.
  • Loading branch information
vvagaytsev committed Nov 22, 2023
1 parent 34b07fe commit c3b48dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/util/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import highlightModule from "cli-highlight"
import { styles } from "../logger/styles.js"

const { readFile, writeFile } = fsExtra
const highlight = highlightModule.default

export async function dumpYaml(yamlPath: string, data: any) {
return writeFile(yamlPath, safeDumpYaml(data, { noRefs: true }))
Expand All @@ -35,7 +34,7 @@ export function encodeYamlMulti(objects: object[]) {
}

export function highlightYaml(s: string) {
return highlight(s, {
return highlightModule.highlight(s, {
language: "yaml",
theme: {
keyword: styles.accent.italic,
Expand Down

0 comments on commit c3b48dc

Please sign in to comment.