Skip to content

Commit

Permalink
lua: replace new lines with spaces in return value of `edicts.ismessa…
Browse files Browse the repository at this point in the history
…ge()` function
  • Loading branch information
alexey-lysiuk committed Dec 23, 2023
1 parent 277bb69 commit 074e2bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Misc/qs_pak/scripts/edicts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ end


local format <const> = string.format
local gsub <const> = string.gsub

local localize <const> = text.localize

Expand Down Expand Up @@ -490,7 +491,7 @@ function edicts.ismessage(edict)
return
end

local description = '"' .. message .. '"'
local description = '"' .. gsub(message, '\n+', ' ') .. '"'
local location = vec3mid(edict.absmin, edict.absmax)

return description, location
Expand Down

0 comments on commit 074e2bd

Please sign in to comment.