changeset 1797:ba43135bb98d

backticks docs
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 11 Feb 2024 18:52:53 -0700
parents 383703b581bc
children f8eba0442956
files website/src/diff.html.luan website/src/manual.html.luan
diffstat 2 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r 383703b581bc -r ba43135bb98d website/src/diff.html.luan
--- a/website/src/diff.html.luan	Wed Jan 31 19:13:05 2024 -0700
+++ b/website/src/diff.html.luan	Sun Feb 11 18:52:53 2024 -0700
@@ -248,6 +248,14 @@
 <%
 						end
 					}
+					backticks = {
+						title = "Backticks"
+						content = function()
+%>
+<p>Backtick expressions are a Luan addition that don't exist in Lua.  See <a href="manual.html#backticks">Backticks</a> in the Luan Reference Manual.</p>
+<%
+						end
+					}
 				}
 			}
 		}
diff -r 383703b581bc -r ba43135bb98d website/src/manual.html.luan
--- a/website/src/manual.html.luan	Wed Jan 31 19:13:05 2024 -0700
+++ b/website/src/manual.html.luan	Sun Feb 11 18:52:53 2024 -0700
@@ -1788,6 +1788,28 @@
 <%
 						end
 					}
+					backticks = {
+						title = "Backticks"
+						content = function()
+%>
+<p>
+A block between backticks is run and then whatever was sent to standard output is returned as a string.  Examples:
+</p>
+<pre>
+	local s = `%&gt;1 + 1 = &lt;%=1+1%&gt;&lt;%`
+
+	local s = ` fn(whatever) `
+
+	local s = `%&gt;
+	...
+	&lt;%`
+</pre>
+<p>
+Backticks complement <a href="#template_stmt">template statements</a>.
+</p>
+<%
+						end
+					}
 				}
 			}
 			visibility = {