-
-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Just to have this recorded - with the following patch to stylemacro.jl
:
diff --git a/src/stylemacro.jl b/src/stylemacro.jl
index 852292e..3aedba1 100644
--- a/src/stylemacro.jl
+++ b/src/stylemacro.jl
@@ -703,9 +705,10 @@ function Base.showerror(io::IO, err::MalformedStylingMacro)
begin_ellipsis = ifelse(start == firstindex(err.raw), "", "…")
end_ellipsis = ifelse(stop == lastindex(err.raw), "", "…")
npre = ncodeunits(Base.escape_string(err.raw[start:position]))
+ pad = ' '^(1+textwidth(begin_ellipsis)+npre)
+ println(io, styled"{error:│} $message:\n\n {error:│} {bright_green:\"{shadow:$begin_ellipsis}$window{shadow:$end_ellipsis}\"}\n\n{error:│} $pad{info:╰─╴$hint}")
- println(io, styled"{error:│} $message:\n\
- {error:│} {bright_green:\"{shadow:$begin_ellipsis}$window{shadow:$end_ellipsis}\"}\n\
- {error:│} $(' '^(1+textwidth(begin_ellipsis)+npre)){info:╰─╴$hint}")
end
end
pluralissues = length(err.problems) > 1
I was able to reduce the problem down to just styled"{1:{:{:aaaa}}}"
, which throws the same kind of error, as well as having trailing null-byte characters in the formatting message introduced somewhere along the way. This (to me) suggests there is some problem with offset calculation that subsequently got fixed with Julia 1.1 by accident. Since the code fails on 1.0.5 and there's ~1000 commits between those two versions, it should be (relatively) straightforward to bisect & hopefully fix through @static if
style version queries.
tecosaur
Metadata
Metadata
Assignees
Labels
No labels