From 91206c9ed0fd9fd314f898967b3e4d27f9074d2f Mon Sep 17 00:00:00 2001 From: Akira Tempaku <paku@skyizwhite.dev> Date: Sun, 30 Mar 2025 20:20:17 +0900 Subject: [PATCH] Amend --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 927bb49..b98fe8a 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,17 @@ For example: Is internally transformed (by macro expansion) into: ```lisp -(create-element :article '(:class "container") - (list - (create-element :h1 nil (list "Title")) - (create-element :p nil (list "Paragraph")) - (create-element #'~share-button '(:service :x) (list)))) +(create-element :article + (list :class "container") + (list (create-element :h1 + (list) + (list "Title")) + (create-element :p + (list) + (list "Paragraph")) + (create-element #'~share-button + (list :service :x) + (list)))) ``` This is made possible via the hsx macro, which detects HTML tags and components, then rewrites them using create-element. Tags are converted to keywords (e.g., div → :div), and custom components (starting with ~) are passed as functions.