changeset 1798:f8eba0442956

use backticks
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 22 Feb 2024 08:08:07 -0700
parents ba43135bb98d
children 1578324d2aac
files src/luan/host/https.luan src/luan/modules/Html.luan
diffstat 2 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/host/https.luan	Sun Feb 11 18:52:53 2024 -0700
+++ b/src/luan/host/https.luan	Thu Feb 22 08:08:07 2024 -0700
@@ -6,7 +6,6 @@
 local Io = require "luan:Io.luan"
 local ip = Io.ip or error()
 local uri = Io.uri or error()
-local output_of = Io.output_of or error()
 local String = require "luan:String.luan"
 local starts_with = String.starts_with or error()
 local Http = require "luan:http/Http.luan"
@@ -137,7 +136,7 @@
 			if key_file.exists() and local_cer_file.exists() then
 				changed = true
 				local conf = load_file "file:startup/nginx/nginx.ssl.conf.luan"
-				local nginx = output_of( function() conf(top_dir,domain) end )
+				local nginx = ` conf(top_dir,domain) `
 				nginx_file.write(nginx)
 			end
 		end
--- a/src/luan/modules/Html.luan	Sun Feb 11 18:52:53 2024 -0700
+++ b/src/luan/modules/Html.luan	Thu Feb 22 08:08:07 2024 -0700
@@ -8,8 +8,6 @@
 local ipairs = Luan.ipairs or error()
 local pairs = Luan.pairs or error()
 local type = Luan.type or error()
-local Io = require "luan:Io.luan"
-local output_of = Io.output_of or error()
 
 
 local Html = {}
@@ -48,7 +46,7 @@
 end
 
 function Html.to_string(list)
-	return output_of( function()
+	return `
 		for _, obj in ipairs(list) do
 			local tp = type(obj)
 			if tp == "string" then
@@ -74,7 +72,7 @@
 				error("invalid value ("..tp..") in list for 'Html.to_string'")
 			end
 		end
-	end )
+	`
 end
 
 return Html