Skip to content

Commit

Permalink
fixed code display on windows (#229)
Browse files Browse the repository at this point in the history
* fixed code display on windows

* version bump

* fmt
  • Loading branch information
FedeClaudi authored Jun 30, 2023
1 parent ae84047 commit 00b2265
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Term"
uuid = "22787eb5-b846-44ae-b979-8e399b8463ab"
authors = ["FedeClaudi <federicoclaudi@protonmail.com> and contributors"]
version = "2.0.4"
version = "2.0.5"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
2 changes: 1 addition & 1 deletion src/highlight.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function load_code_and_highlight(path::AbstractString, lineno::Int; δ::Int = 3)
code = split(join(code), "\n")

# clean
clean(line) = replace(line, " {/ }" => "")
clean(line) = replace(line, " {/ }" => "", '\r' => "")
codelines = clean.(code) # [10-δ:10+δ]
linenos = linenos # [10-δ:10+δ]

Expand Down
4 changes: 2 additions & 2 deletions src/style.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ function MarkupStyle(markup)
style.color = get_color(code)
elseif is_background(code)
style.background = get_color(code; bg = true)
# elseif code != "nothing"
# @debug "Code type not recognized: $code"
# elseif code != "nothing"
# @debug "Code type not recognized: $code"
end
end
return style
Expand Down

0 comments on commit 00b2265

Please sign in to comment.