mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 08:29:04 +00:00
Change " \n" to just "\n" where appropriate in NSE. Leading newlines are
no longer removed from script output.
This commit is contained in:
@@ -440,7 +440,7 @@ local function format_output_sub(status, data, indent)
|
||||
-- Initialize the output string to blank (or, if we're at the top, add a newline)
|
||||
local output = ""
|
||||
if(not(indent)) then
|
||||
output = ' \n'
|
||||
output = '\n'
|
||||
end
|
||||
|
||||
if(not(status)) then
|
||||
@@ -556,7 +556,7 @@ function format_output(status, data, indent)
|
||||
local result = format_output_sub(status, data, indent)
|
||||
|
||||
-- Check for an empty result
|
||||
if(result == nil or #result == "" or result == "\n" or result == " \n") then
|
||||
if(result == nil or #result == "" or result == "\n" or result == "\n") then
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user