File tree 1 file changed +16
-16
lines changed
1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change 96
96
(with-slots (type props) element
97
97
(format stream " <~a~a >" (string-downcase type ) (render-props props))))
98
98
99
+ (defmethod print-object ((element html-tag) stream )
100
+ (format stream " <!DOCTYPE html>~% " )
101
+ (call-next-method ))
102
+
103
+ (defmethod print-object ((element fragment) stream )
104
+ (with-slots (children) element
105
+ (if children
106
+ (format stream
107
+ (if (rest children)
108
+ " ~<~@{ ~a ~^ ~:@_ ~}~:> "
109
+ " ~< ~a ~:> " )
110
+ (render-children element)))))
111
+
112
+ (defmethod print-object ((element component) stream )
113
+ (print-object (expand-component element) stream ))
114
+
99
115
(defun render-props (props)
100
116
(with-output-to-string (stream )
101
117
(loop
120
136
(defmethod render-children ((element non-escaping-tag))
121
137
(element-children element))
122
138
123
- (defmethod print-object ((element html-tag) stream )
124
- (format stream " <!DOCTYPE html>~% " )
125
- (call-next-method ))
126
-
127
- (defmethod print-object ((element fragment) stream )
128
- (with-slots (children) element
129
- (if children
130
- (format stream
131
- (if (rest children)
132
- " ~<~@{ ~a ~^ ~:@_ ~}~:> "
133
- " ~< ~a ~:> " )
134
- children))))
135
-
136
- (defmethod print-object ((element component) stream )
137
- (print-object (expand-component element) stream ))
138
-
139
139
(defmethod expand-component ((element component))
140
140
(with-slots (type props children) element
141
141
(apply type (merge-children-into-props props children))))
You can’t perform that action at this time.
0 commit comments