Spec explorer: full source in drill-in, explore any .sx file
- spec-explore-define uses serialize (full body) instead of signature - _spec-search-dirs expanded: spec/, web/, lib/, shared/sx/ref/, sx/, sxc/, shared/sx/templates/ - explore() works with any filename, not just nav spec items - Playwright tests use flexible regex for line/define counts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -285,29 +285,30 @@
|
||||
(nil? slug)
|
||||
(quote (~specs/architecture-content))
|
||||
(let
|
||||
((found-spec (find-spec slug)))
|
||||
((found-spec (find-spec slug))
|
||||
(filename
|
||||
(if found-spec (get found-spec "filename") (str slug ".sx")))
|
||||
(title (if found-spec (get found-spec "title") slug))
|
||||
(desc (if found-spec (get found-spec "desc") "")))
|
||||
(if
|
||||
(not found-spec)
|
||||
(quasiquote (~specs/not-found :slug (unquote slug)))
|
||||
(if
|
||||
defname
|
||||
(let
|
||||
((d (spec-explore-define (get found-spec "filename") defname)))
|
||||
(if
|
||||
d
|
||||
(quasiquote
|
||||
(~specs-explorer/spec-explorer-define-detail
|
||||
:d (unquote d)
|
||||
:filename (unquote (get found-spec "filename"))))
|
||||
(quasiquote
|
||||
(~specs/not-found :slug (unquote (str slug "." defname))))))
|
||||
(let
|
||||
((data (spec-explore (get found-spec "filename") (get found-spec "title") (get found-spec "desc"))))
|
||||
(if
|
||||
data
|
||||
(quasiquote
|
||||
(~specs-explorer/spec-explorer-content :data (unquote data)))
|
||||
(quasiquote (~specs/not-found :slug (unquote slug)))))))))))
|
||||
defname
|
||||
(let
|
||||
((d (spec-explore-define filename defname)))
|
||||
(if
|
||||
d
|
||||
(quasiquote
|
||||
(~specs-explorer/spec-explorer-define-detail
|
||||
:d (unquote d)
|
||||
:filename (unquote filename)))
|
||||
(quasiquote
|
||||
(~specs/not-found :slug (unquote (str slug "." defname))))))
|
||||
(let
|
||||
((data (spec-explore filename title desc)))
|
||||
(if
|
||||
data
|
||||
(quasiquote
|
||||
(~specs-explorer/spec-explorer-content :data (unquote data)))
|
||||
(quasiquote (~specs/not-found :slug (unquote slug))))))))))
|
||||
|
||||
(define
|
||||
make-spec-files
|
||||
|
||||
Reference in New Issue
Block a user