Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
parenscript
parenscript
Commits
4207b3b0
Verified
Commit
4207b3b0
authored
Oct 27, 2018
by
Vladimir Sedach
Browse files
Updated introduction.lisp PS-HTML example w/current PS-HTML output
parent
2806eec2
Changes
2
Show whitespace changes
Inline
Side-by-side
docs/introduction.lisp
View file @
4207b3b0
...
@@ -87,7 +87,7 @@ for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
...
@@ -87,7 +87,7 @@ for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
(
ps
(
ps
(
defun
add-div
(
name
href
link-text
)
(
defun
add-div
(
name
href
link-text
)
(
document
.
write
(
funcall
(
getprop
document
'
write
)
(
ps-html
((
:div
:id
name
)
(
ps-html
((
:div
:id
name
)
"The link is: "
"The link is: "
((
:a
:href
href
)
link-text
))))))
((
:a
:href
href
)
link-text
))))))
...
@@ -95,8 +95,6 @@ for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
...
@@ -95,8 +95,6 @@ for (var i = 0, j = arr[i]; i < 10; i = ++i, j = arr[i]) {
;; compiles to
;; compiles to
"
"
function addDiv(name, href, linkText) {
function addDiv(name, href, linkText) {
document.write('<div id=\"' + name + '\">The link is: <a href=\"'
return document.write(['<div id=\\\"', name, '\\\">The link is: <a href=\\\"', href, '\\\">', linkText, '</a></div>'].join(''));
+ href + '\">'
};
+ linkText + '</a></div>');
}
"
"
src/non-cl.lisp
View file @
4207b3b0
...
@@ -243,7 +243,7 @@
...
@@ -243,7 +243,7 @@
(
defpsmacro
stringify
(
&rest
things
)
(
defpsmacro
stringify
(
&rest
things
)
(
if
(
and
(
=
(
length
things
)
1
)
(
stringp
(
car
things
)))
(
if
(
and
(
=
(
length
things
)
1
)
(
stringp
(
car
things
)))
(
car
things
)
(
car
things
)
`
(
(
@
(
list
,@
things
)
join
)
""
)))
`
(
funcall
(
getprop
(
list
,@
things
)
'
join
)
""
)))
(
defun
stringify
(
&rest
things
)
(
defun
stringify
(
&rest
things
)
"Like concatenate but prints all of its arguments."
"Like concatenate but prints all of its arguments."
(
format
nil
"~{~A~}"
things
))
(
format
nil
"~{~A~}"
things
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment