version 1.56, 2008/08/24 12:28:11
|
version 1.61, 2010/02/13 17:01:44
|
Line 270 Defer parse-line
|
Line 270 Defer parse-line
|
s" ]" link-suffix $+! |
s" ]" link-suffix $+! |
link-suffix $@ alt= ; |
link-suffix $@ alt= ; |
|
|
|
: replace.- ( addr u -- ) |
|
bounds ?DO I c@ '. = IF '- I c! THEN LOOP ; |
|
|
: get-icon ( addr u -- ) iconpath @ IF 2drop EXIT THEN |
: get-icon ( addr u -- ) iconpath @ IF 2drop EXIT THEN |
link-suffix $! s" .*" link-suffix $+! |
link-suffix $! link-suffix $@ replace.- |
icon-prefix $@ open-dir throw >r |
s" .*" link-suffix $+! |
|
icon-prefix $@ open-dir IF drop EXIT THEN >r |
BEGIN |
BEGIN |
pad $100 r@ read-dir throw WHILE |
pad $100 r@ read-dir throw WHILE |
pad swap 2dup link-suffix $@ filename-match |
pad swap 2dup link-suffix $@ filename-match |
Line 380 Create do-words $100 0 [DO] ' .text , [
|
Line 384 Create do-words $100 0 [DO] ' .text , [
|
: >tag '\ parse type '\ parse tag ; |
: >tag '\ parse type '\ parse tag ; |
|
|
char>tag * b |
char>tag * b |
|
char>tag / i |
char>tag _ em |
char>tag _ em |
char>tag # code |
char>tag # code |
:noname '~ parse .type '~ parse .type ; '~ cells do-words + ! |
:noname '~ parse .type '~ parse .type ; '~ cells do-words + ! |
Line 462 Create nav-buf 0 c,
|
Line 467 Create nav-buf 0 c,
|
ELSE dup 'a 'z 1+ within IF nav+ |
ELSE dup 'a 'z 1+ within IF nav+ |
ELSE dup '0 '9 1+ within IF nav+ |
ELSE dup '0 '9 1+ within IF nav+ |
ELSE dup bl = over '- = or IF '- nav+ |
ELSE dup bl = over '- = or IF '- nav+ |
ELSE nav+ |
ELSE drop |
THEN THEN THEN THEN |
THEN THEN THEN THEN |
LOOP ; |
LOOP ; |
: >nav ( addr u -- addr' u' ) |
: >nav ( addr u -- addr' u' ) |
Line 549 true Value toc-image
|
Line 554 true Value toc-image
|
indentlevel @ over |
indentlevel @ over |
indentlevel ! |
indentlevel ! |
2dup < IF swap DO -env LOOP EXIT THEN |
2dup < IF swap DO -env LOOP EXIT THEN |
2dup > IF DO s" div" >env LOOP EXIT THEN |
2dup > IF DO indent= s" div" >env LOOP EXIT THEN |
2dup = IF drop IF -env s" div" >env THEN THEN |
2dup = IF drop IF -env indent= s" div" >env THEN THEN |
; |
|
: +indent ( -- ) |
|
indentlevel @ IF -env indent= s" div" >env THEN |
|
; |
; |
|
|
wordlist constant longtags |
wordlist constant longtags |
Line 563 Variable divs
|
Line 565 Variable divs
|
longtags set-current |
longtags set-current |
|
|
: --- 0 indent cr s" hr" tag/ cr ; |
: --- 0 indent cr s" hr" tag/ cr ; |
: * 1 indent +indent s" h1" dclass= s" h1" par s" " dclass= ; |
: * 1 indent s" h1" dclass= s" h1" par s" " dclass= ; |
: ** 1 indent +indent s" h2" dclass= s" h2" par s" " dclass= ; |
: ** 1 indent s" h2" dclass= s" h2" par s" " dclass= ; |
: *** 2 indent +indent s" h3" dclass= s" h3" par s" " dclass= ; |
: *** 2 indent s" h3" dclass= s" h3" par s" " dclass= ; |
: -- 0 indent cr print-toc ; |
: -- 0 indent cr print-toc ; |
: && 0 parse id= ; |
: && 0 parse id= ; |
: - s" ul" env s" li" par ; |
: - s" ul" env s" li" par ; |
Line 730 Variable orig-date
|
Line 732 Variable orig-date
|
s" Mail|@/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged |
s" Mail|@/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged |
public-key @ IF |
public-key @ IF |
public-key $@ href= s" a" tag |
public-key $@ href= s" a" tag |
s" PGP key|-@/gpg.asc.gif" .img s" a" /tag |
s" PGP key|-@/gpg-asc.gif" .img s" a" /tag |
THEN |
THEN |
-envs ; |
-envs ; |
|
|
Line 740 Variable orig-date
|
Line 742 Variable orig-date
|
'< sword -trailing mail-name $! '> sword mail $! ; |
'< sword -trailing mail-name $! '> sword mail $! ; |
: pgp-key ( -- ) |
: pgp-key ( -- ) |
bl sword -trailing public-key $! ; |
bl sword -trailing public-key $! ; |
: charset ( -- ) s" text/xhtml; charset=" content $! |
: charset ( -- ) s" application/xhtml+xml; charset=" content $! |
bl sword -trailing 2dup content $+! _charset $! ; |
bl sword -trailing 2dup content $+! _charset $! ; |
|
|
charset iso-8859-1 |
charset iso-8859-1 |