From ff4671eca8e75611a76368eb3f3a3dde334ddb80 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 29 May 2023 19:05:38 -0700 Subject: README: notes about interpolation. * README.md: Add a note about Lisp evaluation: Lisp expressions that give attribute values are interpolated into HTML; Lisp expressions in tag body are evaled for side effect only. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index fffa92d..71d6773 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,15 @@ interpreted as the tag content. All material that is not a tag or attribute keyword is an evaluated Lisp expression, so no special syntax is needed to indicate evaluation. +When the value of an attribute is given as a Lisp expression, that +value is interpolated automatically into the generated attribute +syntax. + +In the interior of a tag, when a Lisp expression is evaluated, its +value is **not** turned into output. It is that expression's +responsibility to generate output, either directly to the HTML +stream object, or via the convenient local macros like `fmt`, +`esc` or `str`. ## Documentation -- cgit v1.2.3