Skip to content

Commit

Permalink
[ change ] Remove removeNewlines
Browse files Browse the repository at this point in the history
  • Loading branch information
banacorn committed Nov 17, 2024
1 parent 2848df7 commit 6f28973
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
36 changes: 15 additions & 21 deletions lib/js/src/State/State__Response.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions src/State/State__Response.res
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ let indent = (content, indent) => {
let indentation = String.repeat(" ", indent)
content->String.replaceRegExp(%re("/\n/g"), "\n" ++ indentation) // should also handles CR LF on Windows
}
// does this function really do anything?
let removeNewlines = string => string->String.split("\n")->Array.join("\n")

open Response
module DisplayInfo = {
Expand Down Expand Up @@ -207,14 +205,12 @@ let rec handle = async (
}
| DisplayInfo(info) => await DisplayInfo.handle(state, info)
| RunningInfo(1, message) =>
let message = removeNewlines(message)
await State.View.Panel.displayInAppendMode(
state,
Plain("Type-checking"),
[Item.plainText(message)],
)
| RunningInfo(verbosity, message) =>
let message = removeNewlines(message)
state.runningInfoLog->Array.push((verbosity, message))->ignore
await State.View.DebugBuffer.displayInAppendMode([(verbosity, message)])
| CompleteHighlightingAndMakePromptReappear =>
Expand Down

0 comments on commit 6f28973

Please sign in to comment.