GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — WIP: add option to output xexpr of html (new source branch) by stevebyan · Pull Request #519 · racket/scribble Conversation
Contributor
Output the body as an xexpr, and provide various metadata, including TOC links, in a struct rather than in html. I've refactored html-render.rkt to optionally output the body of the document as an xexpr rather than as html, and provide document metadata including the TOC links in a struct rather than in html. My goal is to allow use of scribble's html in something like Greg Hendershott's Tadpole, and so I want to provide the document content in a form that can be applied to an xexpr template. I also want to provide the TOC links in a form that can be rendered by site templates using pure CSS to provide a responsive view of the navigation links. I'm submitting this pull request to gather some feedback on my approach, before committing to doing more work to make this something actually mergeable into Scribble. To pull out the TOC as data rather than as html, I've duplicated a lot of code from the render-toc-view and render-onthispage-contents methods. A finished pull request would refactor render-toc-view and render-onthispage-contents to use the output of my list-of-toc-view and list-of-onthispage-contents. I'm also not sure at this point how I want to represent the TOC contents. Using structs would probably be better than the current hacked nested lists. Is this a feature the Racket developers would consider including in Scribble? Except for the duplicated code, does my implementation approach look reasonable? Supercedes PR #498
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsOutput the body as an xexpr, and provide various metadata, including TOC links, in a struct rather than in html. Also fix logic for 'no-toc+aux
stevebyan
marked this pull request as draft
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resyntax analyzed 4 files in this pull request and has added suggestions.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+854
to
+859
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (for/list ([p (in-list (part-parts d))])"
" (if (or (part-whole-page? p ri)"
" (and (part-style? p 'toc-hidden) (all-toc-hidden? p)))"
" null"
" (flatten p prefixes #f))))))))")
#:original-lines
'#(" (map (lambda (p) (if (or (part-whole-page? p ri) "
" (and (part-style? p 'toc-hidden)"
" (all-toc-hidden? p)))"
" null"
" (flatten p prefixes #f)))"
" (part-parts d)))))))")
#:start-line 854)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.17.0.6/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:157:2 (for/list ((p (in-list (part-parts d)))) (if (or (part-whole-page? p ri) (and (part-style? p (quote toc-hidden)) (all-toc-hidden? p))) null (flatten p prefixes #f)))>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:854:18 (map (lambda (p) (if (or (part-whole-page? p ri) (and (part-style? p (quote toc-hidden)) (all-toc-hidden? p))) null (flatten p prefixes #f))) (part-parts d))>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+866
to
+910
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (for/list ([p (in-list ps)])"
" (let ([p (vector-ref p 0)]"
" [prefixes (vector-ref p 1)]"
" [from-d (vector-ref p 2)]"
" [add-tag-prefixes (lambda (t prefixes)"
" (if (null? prefixes)"
" t"
" (cons (car t) (append prefixes (cdr t)))))])"
" (list (if (part? p)"
" (format-number (collected-info-number (part-collected-info p ri)) null)"
" null)"
" (if (toc-element? p)"
" (render-content (toc-element-toc-content p) from-d ri)"
" (parameterize ([current-no-links #t]"
" [extra-breaking? #t])"
" (list (uri-unreserved-encode"
" (anchor-name (add-tag-prefixes"
" (tag-key (if (part? p)"
" (car (part-tags/nonempty p))"
" (target-element-tag p))"
" ri)"
" prefixes)))"
" (cond"
" [(part? p) \"tocsubseclink\"]"
" [any-parts? \"tocsubnonseclink\"]"
" [else \"tocsublink\"])"
" (render-content (if (part? p)"
" (strip-aux (or (part-title-content p) \"???\"))"
" (if (toc-target2-element? p)"
" (toc-target2-element-toc-content p)"
" (element-content p)))"
" from-d"
" ri)))))))))))")
#:original-lines
'#(" (map (lambda (p)"
" (let ([p (vector-ref p 0)]"
" [prefixes (vector-ref p 1)]"
" [from-d (vector-ref p 2)]"
" [add-tag-prefixes"
" (lambda (t prefixes)"
" (if (null? prefixes)"
" t"
" (cons (car t) (append prefixes (cdr t)))))])"
" (list"
" (if (part? p)"
" (format-number"
" (collected-info-number"
" (part-collected-info p ri))"
" null)"
" null)"
" (if (toc-element? p)"
" (render-content (toc-element-toc-content p)"
" from-d ri)"
" (parameterize ([current-no-links #t]"
" [extra-breaking? #t])"
" (list "
" (uri-unreserved-encode"
" (anchor-name"
" (add-tag-prefixes"
" (tag-key (if (part? p)"
" (car (part-tags/nonempty p))"
" (target-element-tag p))"
" ri)"
" prefixes)))"
" (cond"
" [(part? p) \"tocsubseclink\"]"
" [any-parts? \"tocsubnonseclink\"]"
" [else \"tocsublink\"])"
" "
" (render-content"
" (if (part? p)"
" (strip-aux"
" (or (part-title-content p)"
" \"???\"))"
" (if (toc-target2-element? p)"
" (toc-target2-element-toc-content p)"
" (element-content p)))"
" from-d ri)))))))"
" ps)))))")
#:start-line 866)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.17.0.6/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:157:2 (for/list ((p (in-list ps))) (let ((p (vector-ref p 0)) (prefixes (vector-ref p 1)) (from-d (vector-ref p 2)) (add-tag-prefixes (lambda (t prefixes) (if (null? prefixes) t (cons (car t) (append prefixes (cdr t))))))) (list (if (part? p) (format-number (...>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:866:15 (map (lambda (p) (let ((p (vector-ref p 0)) (prefixes (vector-ref p 1)) (from-d (vector-ref p 2)) (add-tag-prefixes (lambda (t prefixes) (if (null? prefixes) t (cons (car t) (append prefixes (cdr t))))))) (list (if (part? p) (format-number (collected-in...>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
2232
to
2243
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (define fn"
" (if (depth . < . directory-depth)"
" (path->string"
" (build-path base (path-replace-extension (string->path \"index\") (super get-suffix))))"
" (format (string-append \"~a\" (path->string (bytes->path (super get-suffix)))) base)))"
" (when ((string-length fn) . >= . 48)"
" (error \"file name too long (need a tag):\" fn))"
" fn))")
#:original-lines
'#(" (let ([fn (if (depth . < . directory-depth)"
" (path->string"
" (build-path base"
" (path-replace-extension (string->path \"index\")"
" (super get-suffix))))"
" (format"
" (string-append \"~a\""
" (path->string"
" (bytes->path (super get-suffix)))) base))])"
" (when ((string-length fn) . >= . 48)"
" (error \"file name too long (need a tag):\" fn))"
" fn)))")
#:start-line 2232)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:.../resyntax/base.rkt:183:28 (let ((base (regexp-replace* "[^-a-zA-Z0-9_=]" (string-append (append-part-prefixes d ci ri) (let ((s (cadr (car (part-tags/nonempty d))))) (cond ((string? s) s) ((part-title-content d) (content->string (part-title-content d))) (else (format "???~a" (eq...>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:2220:6 (let ((base (regexp-replace* "[^-a-zA-Z0-9_=]" (string-append (append-part-prefixes d ci ri) (let ((s (cadr (car (part-tags/nonempty d))))) (cond ((string? s) s) ((part-title-content d) (content->string (part-title-content d))) (else (format "???~a" (eq...>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resyntax analyzed 4 files in this pull request and has added suggestions.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+854
to
+859
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (for/list ([p (in-list (part-parts d))])"
" (if (or (part-whole-page? p ri)"
" (and (part-style? p 'toc-hidden) (all-toc-hidden? p)))"
" null"
" (flatten p prefixes #f))))))))")
#:original-lines
'#(" (map (lambda (p) (if (or (part-whole-page? p ri) "
" (and (part-style? p 'toc-hidden)"
" (all-toc-hidden? p)))"
" null"
" (flatten p prefixes #f)))"
" (part-parts d)))))))")
#:start-line 854)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.17.0.6/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:157:2 (for/list ((p (in-list (part-parts d)))) (if (or (part-whole-page? p ri) (and (part-style? p (quote toc-hidden)) (all-toc-hidden? p))) null (flatten p prefixes #f)))>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:854:18 (map (lambda (p) (if (or (part-whole-page? p ri) (and (part-style? p (quote toc-hidden)) (all-toc-hidden? p))) null (flatten p prefixes #f))) (part-parts d))>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+866
to
+910
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (for/list ([p (in-list ps)])"
" (let ([p (vector-ref p 0)]"
" [prefixes (vector-ref p 1)]"
" [from-d (vector-ref p 2)]"
" [add-tag-prefixes (lambda (t prefixes)"
" (if (null? prefixes)"
" t"
" (cons (car t) (append prefixes (cdr t)))))])"
" (list (if (part? p)"
" (format-number (collected-info-number (part-collected-info p ri)) null)"
" null)"
" (if (toc-element? p)"
" (render-content (toc-element-toc-content p) from-d ri)"
" (parameterize ([current-no-links #t]"
" [extra-breaking? #t])"
" (list (uri-unreserved-encode"
" (anchor-name (add-tag-prefixes"
" (tag-key (if (part? p)"
" (car (part-tags/nonempty p))"
" (target-element-tag p))"
" ri)"
" prefixes)))"
" (cond"
" [(part? p) \"tocsubseclink\"]"
" [any-parts? \"tocsubnonseclink\"]"
" [else \"tocsublink\"])"
" (render-content (if (part? p)"
" (strip-aux (or (part-title-content p) \"???\"))"
" (if (toc-target2-element? p)"
" (toc-target2-element-toc-content p)"
" (element-content p)))"
" from-d"
" ri)))))))))))")
#:original-lines
'#(" (map (lambda (p)"
" (let ([p (vector-ref p 0)]"
" [prefixes (vector-ref p 1)]"
" [from-d (vector-ref p 2)]"
" [add-tag-prefixes"
" (lambda (t prefixes)"
" (if (null? prefixes)"
" t"
" (cons (car t) (append prefixes (cdr t)))))])"
" (list"
" (if (part? p)"
" (format-number"
" (collected-info-number"
" (part-collected-info p ri))"
" null)"
" null)"
" (if (toc-element? p)"
" (render-content (toc-element-toc-content p)"
" from-d ri)"
" (parameterize ([current-no-links #t]"
" [extra-breaking? #t])"
" (list "
" (uri-unreserved-encode"
" (anchor-name"
" (add-tag-prefixes"
" (tag-key (if (part? p)"
" (car (part-tags/nonempty p))"
" (target-element-tag p))"
" ri)"
" prefixes)))"
" (cond"
" [(part? p) \"tocsubseclink\"]"
" [any-parts? \"tocsubnonseclink\"]"
" [else \"tocsublink\"])"
" "
" (render-content"
" (if (part? p)"
" (strip-aux"
" (or (part-title-content p)"
" \"???\"))"
" (if (toc-target2-element? p)"
" (toc-target2-element-toc-content p)"
" (element-content p)))"
" from-d ri)))))))"
" ps)))))")
#:start-line 866)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.17.0.6/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:157:2 (for/list ((p (in-list ps))) (let ((p (vector-ref p 0)) (prefixes (vector-ref p 1)) (from-d (vector-ref p 2)) (add-tag-prefixes (lambda (t prefixes) (if (null? prefixes) t (cons (car t) (append prefixes (cdr t))))))) (list (if (part? p) (format-number (...>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:866:15 (map (lambda (p) (let ((p (vector-ref p 0)) (prefixes (vector-ref p 1)) (from-d (vector-ref p 2)) (add-tag-prefixes (lambda (t prefixes) (if (null? prefixes) t (cons (car t) (append prefixes (cdr t))))))) (list (if (part? p) (format-number (collected-in...>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
2240
to
2251
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (define fn"
" (if (depth . < . directory-depth)"
" (path->string"
" (build-path base (path-replace-extension (string->path \"index\") (super get-suffix))))"
" (format (string-append \"~a\" (path->string (bytes->path (super get-suffix)))) base)))"
" (when ((string-length fn) . >= . 48)"
" (error \"file name too long (need a tag):\" fn))"
" fn))")
#:original-lines
'#(" (let ([fn (if (depth . < . directory-depth)"
" (path->string"
" (build-path base"
" (path-replace-extension (string->path \"index\")"
" (super get-suffix))))"
" (format"
" (string-append \"~a\""
" (path->string"
" (bytes->path (super get-suffix)))) base))])"
" (when ((string-length fn) . >= . 48)"
" (error \"file name too long (need a tag):\" fn))"
" fn)))")
#:start-line 2240)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:.../resyntax/base.rkt:183:28 (let ((base (regexp-replace* "[^-a-zA-Z0-9_=]" (string-append (append-part-prefixes d ci ri) (let ((s (cadr (car (part-tags/nonempty d))))) (cond ((string? s) s) ((part-title-content d) (content->string (part-title-content d))) (else (format "???~a" (eq...>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:2228:6 (let ((base (regexp-replace* "[^-a-zA-Z0-9_=]" (string-append (append-part-prefixes d ci ri) (let ((s (cadr (car (part-tags/nonempty d))))) (cond ((string? s) s) ((part-title-content d) (content->string (part-title-content d))) (else (format "???~a" (eq...>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionstemporary code, for investigation of toc structure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resyntax analyzed 4 files in this pull request and has added suggestions.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+855
to
+860
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (for/list ([p (in-list (part-parts d))])"
" (if (or (part-whole-page? p ri)"
" (and (part-style? p 'toc-hidden) (all-toc-hidden? p)))"
" null"
" (flatten p prefixes #f))))))))")
#:original-lines
'#(" (map (lambda (p) (if (or (part-whole-page? p ri) "
" (and (part-style? p 'toc-hidden)"
" (all-toc-hidden? p)))"
" null"
" (flatten p prefixes #f)))"
" (part-parts d)))))))")
#:start-line 855)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.17.0.6/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:157:2 (for/list ((p (in-list (part-parts d)))) (if (or (part-whole-page? p ri) (and (part-style? p (quote toc-hidden)) (all-toc-hidden? p))) null (flatten p prefixes #f)))>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:855:18 (map (lambda (p) (if (or (part-whole-page? p ri) (and (part-style? p (quote toc-hidden)) (all-toc-hidden? p))) null (flatten p prefixes #f))) (part-parts d))>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+869
to
+915
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (for/list ([p (in-list ps)])"
" (let ([p (vector-ref p 0)]"
" [prefixes (vector-ref p 1)]"
" [from-d (vector-ref p 2)]"
" [add-tag-prefixes (lambda (t prefixes)"
" (if (null? prefixes)"
" t"
" (cons (car t) (append prefixes (cdr t)))))])"
" (list (if (part? p)"
" (format-number (collected-info-number (part-collected-info p ri)) null)"
" null)"
" (if (toc-element? p)"
" (render-content (toc-element-toc-content p) from-d ri)"
" (parameterize ([current-no-links #t]"
" [extra-breaking? #t])"
" (list (format \"#~a\""
" (uri-unreserved-encode"
" (anchor-name (add-tag-prefixes"
" (tag-key (if (part? p)"
" (car (part-tags/nonempty p))"
" (target-element-tag p))"
" ri)"
" prefixes))))"
" (cond"
" [(part? p) \"tocsubseclink\"]"
" [any-parts? \"tocsubnonseclink\"]"
" [else \"tocsublink\"])"
" (render-content (if (part? p)"
" (strip-aux (or (part-title-content p)"
" \"???\"))"
" (if (toc-target2-element? p)"
" (toc-target2-element-toc-content p)"
" (element-content p)))"
" from-d"
" ri))))))))))))")
#:original-lines
'#(" (map (lambda (p)"
" (let ([p (vector-ref p 0)]"
" [prefixes (vector-ref p 1)]"
" [from-d (vector-ref p 2)]"
" [add-tag-prefixes"
" (lambda (t prefixes)"
" (if (null? prefixes)"
" t"
" (cons (car t) (append prefixes (cdr t)))))])"
" (list"
" (if (part? p)"
" (format-number"
" (collected-info-number"
" (part-collected-info p ri))"
" null)"
" null)"
" (if (toc-element? p)"
" (render-content (toc-element-toc-content p)"
" from-d ri)"
" (parameterize ([current-no-links #t]"
" [extra-breaking? #t])"
" (list "
" (format"
" \"#~a\""
" (uri-unreserved-encode"
" (anchor-name"
" (add-tag-prefixes"
" (tag-key (if (part? p)"
" (car (part-tags/nonempty p))"
" (target-element-tag p))"
" ri)"
" prefixes))))"
" (cond"
" [(part? p) \"tocsubseclink\"]"
" [any-parts? \"tocsubnonseclink\"]"
" [else \"tocsublink\"])"
" "
" (render-content"
" (if (part? p)"
" (strip-aux"
" (or (part-title-content p)"
" \"???\"))"
" (if (toc-target2-element? p)"
" (toc-target2-element-toc-content p)"
" (element-content p)))"
" from-d ri)))))))"
" ps))))))")
#:start-line 869)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/8.17.0.6/pkgs/resyntax/default-recommendations/for-loop-shortcuts.rkt:157:2 (for/list ((p (in-list ps))) (let ((p (vector-ref p 0)) (prefixes (vector-ref p 1)) (from-d (vector-ref p 2)) (add-tag-prefixes (lambda (t prefixes) (if (null? prefixes) t (cons (car t) (append prefixes (cdr t))))))) (list (if (part? p) (format-number (...>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:869:16 (map (lambda (p) (let ((p (vector-ref p 0)) (prefixes (vector-ref p 1)) (from-d (vector-ref p 2)) (add-tag-prefixes (lambda (t prefixes) (if (null? prefixes) t (cons (car t) (append prefixes (cdr t))))))) (list (if (part? p) (format-number (collected-in...>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
2248
to
2259
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Debugging detailsTextual replacement(line-replacement
#:new-lines
'#(" (define fn"
" (if (depth . < . directory-depth)"
" (path->string"
" (build-path base (path-replace-extension (string->path \"index\") (super get-suffix))))"
" (format (string-append \"~a\" (path->string (bytes->path (super get-suffix)))) base)))"
" (when ((string-length fn) . >= . 48)"
" (error \"file name too long (need a tag):\" fn))"
" fn))")
#:original-lines
'#(" (let ([fn (if (depth . < . directory-depth)"
" (path->string"
" (build-path base"
" (path-replace-extension (string->path \"index\")"
" (super get-suffix))))"
" (format"
" (string-append \"~a\""
" (path->string"
" (bytes->path (super get-suffix)))) base))])"
" (when ((string-length fn) . >= . 48)"
" (error \"file name too long (need a tag):\" fn))"
" fn)))")
#:start-line 2248)Syntactic replacement(syntax-replacement
#:introduction-scope #<procedure:...and/syntax-local.rkt:148:2>
#:new-syntax
#<syntax:.../resyntax/base.rkt:183:28 (let ((base (regexp-replace* "[^-a-zA-Z0-9_=]" (string-append (append-part-prefixes d ci ri) (let ((s (cadr (car (part-tags/nonempty d))))) (cond ((string? s) s) ((part-title-content d) (content->string (part-title-content d))) (else (format "???~a" (eq...>
#:original-syntax
#<syntax:scribble-lib/scribble/html-render.rkt:2236:6 (let ((base (regexp-replace* "[^-a-zA-Z0-9_=]" (string-append (append-part-prefixes d ci ri) (let ((s (cadr (car (part-tags/nonempty d))))) (cond ((string? s) s) ((part-title-content d) (content->string (part-title-content d))) (else (format "???~a" (eq...>
#:source
(file-source
#<path:/home/runner/work/scribble/scribble/scribble-lib/scribble/html-render.rkt>))
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |