From ae806a1942dd6cc7a2f4c37347a1b47d227fd824 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Tue, 12 Mar 2024 15:34:40 +0100 Subject: [PATCH] fix(config): do not escape glyphs for toml and yaml --- src/engine/config.go | 4 ++-- src/go.mod | 4 +--- src/go.sum | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/engine/config.go b/src/engine/config.go index caf0a34b..821472c9 100644 --- a/src/engine/config.go +++ b/src/engine/config.go @@ -184,7 +184,7 @@ func (cfg *Config) Export(format string) string { return "" } - return prefix + escapeGlyphs(result.String(), cfg.MigrateGlyphs) + return prefix + result.String() case JSON: jsonEncoder := json.NewEncoder(&result) jsonEncoder.SetEscapeHTML(false) @@ -203,7 +203,7 @@ func (cfg *Config) Export(format string) string { return "" } - return prefix + escapeGlyphs(result.String(), cfg.MigrateGlyphs) + return prefix + result.String() } // unsupported format diff --git a/src/go.mod b/src/go.mod index 9d348f2c..aa422e73 100644 --- a/src/go.mod +++ b/src/go.mod @@ -97,6 +97,4 @@ replace github.com/atotto/clipboard v0.1.4 => github.com/jandedobbeleer/clipboar replace github.com/shirou/gopsutil/v3 v3.23.9 => github.com/jandedobbeleer/gopsutil/v3 v3.23.9-1 -replace github.com/goccy/go-yaml v1.11.3 => github.com/jandedobbeleer/go-yaml v1.11.3-1 - -replace github.com/pelletier/go-toml/v2 v2.1.1 => github.com/jandedobbeleer/go-toml/v2 v2.1.1-1 +replace github.com/goccy/go-yaml v1.11.3 => github.com/jandedobbeleer/go-yaml v1.11.3-2 diff --git a/src/go.sum b/src/go.sum index b839ac10..c4377614 100644 --- a/src/go.sum +++ b/src/go.sum @@ -84,10 +84,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jandedobbeleer/clipboard v0.1.4-1 h1:rJehm5W0a3hvjcxyB3snqLBV4yvMBBc12JyMP7ngNQw= github.com/jandedobbeleer/clipboard v0.1.4-1/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/jandedobbeleer/go-toml/v2 v2.1.1-1 h1:jBguKQLD6Inqf7mzHNNvWfbVO/apta+3Xlm9ronMBec= -github.com/jandedobbeleer/go-toml/v2 v2.1.1-1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= -github.com/jandedobbeleer/go-yaml v1.11.3-1 h1:zAcPoe0u2aTOZHq0cNXBc2KpNjuyv02UPCzB8a2ibso= -github.com/jandedobbeleer/go-yaml v1.11.3-1/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= +github.com/jandedobbeleer/go-yaml v1.11.3-2 h1:mz6E/lRl29RqwYkb4HC03C2YwF5tVDNdfiPWa1hYRdo= +github.com/jandedobbeleer/go-yaml v1.11.3-2/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -132,6 +130,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=