Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Nov 11, 2024
1 parent 9d50366 commit e512f24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/webserver/REPLTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import REPL
###

function format_path_completion(completion)
replace(replace(completion_text(completion), "\\ " => " "), "\\\\" => "\\")
replace(completion_text(completion), "\\ " => " ", "\\\\" => "\\")
end

responses[:completepath] = function response_completepath(🙋::ClientRequest)
Expand Down
13 changes: 7 additions & 6 deletions src/webserver/Static.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ function error_response(
template = read(project_relative_path(frontend_directory(), "error.jl.html"), String)

body_title = body == "" ? "" : "Error message:"
filled_in = replace(replace(replace(replace(replace(template,
"\$STYLE" => """<style>$(read(project_relative_path("frontend", "error.css"), String))</style>"""),
"\$TITLE" => title),
"\$ADVICE" => advice),
"\$BODYTITLE" => body_title),
"\$BODY" => htmlesc(body))
filled_in = replace(template,
"\$STYLE" => """<style>$(read(project_relative_path("frontend", "error.css"), String))</style>""",
"\$TITLE" => title,
"\$ADVICE" => advice,
"\$BODYTITLE" => body_title,
"\$BODY" => htmlesc(body),
)

response = HTTP.Response(status_code, filled_in)
HTTP.setheader(response, "Content-Type" => MIMEs.contenttype_from_mime(MIME"text/html"()))
Expand Down

0 comments on commit e512f24

Please sign in to comment.