File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,11 +84,12 @@ $(cargo build --manifest-path ~(str mdbook-eval-dir "/Cargo.toml"))
8484(def mdbook-path (str mdbook-eval-dir "/target/debug"))
8585(def new-path (str (env "PATH") ":" mdbook-path))
8686
87- (prn "Running mdbook build with PATH=" new-path)
88- (sh (str "export PATH=\"" new-path "\" && mdbook build"))
89-
90- (sh "./search-hack-patch.sh")
91-
92- (when (= args-local.1 "serve")
93- (prn "Starting mdbook serve...")
94- (sh (str "export PATH=\"" new-path "\" && mdbook serve")))
87+ (if (= args-local.1 "serve")
88+ (do
89+ (prn "Starting mdbook serve...")
90+ $(rm -rf book)
91+ (sh (str "export PATH=\"" new-path "\" && mdbook serve")))
92+ (do
93+ (prn "Running mdbook build with PATH=" new-path)
94+ (sh (str "export PATH=\"" new-path "\" && mdbook build"))
95+ (sh "./search-hack-patch.sh")))
Original file line number Diff line number Diff line change @@ -153,6 +153,12 @@ impl Namespace {
153153 match self {
154154 Namespace :: Global => {
155155 for g in vm. globals ( ) . clone ( ) . keys ( ) {
156+ // Skip namespace-qualified symbols (contain "::") - they'll
157+ // be collected when iterating their named namespace.
158+ let name = vm. get_interned ( * g) ;
159+ if name. contains ( "::" ) {
160+ continue ;
161+ }
156162 self . get_doc ( g, docs, vm, require_proper_format) ?;
157163 }
158164 }
@@ -420,6 +426,11 @@ impl SloshDoc {
420426 if let Some ( slot) = slot {
421427 let doc_string = DocStringSection :: new_incomplete ( slot, & sym, vm) ;
422428 let symbol = sym. display_value ( vm) ;
429+ let mut full_name: Vec < _ > = symbol. split ( "::" ) . collect ( ) ;
430+ let symbol = full_name
431+ . pop ( )
432+ . expect ( "Symbol should never be an empty." )
433+ . to_string ( ) ;
423434 let symbol_type = sym. display_type ( vm) . to_string ( ) ;
424435 let namespace = namespace. display ( vm) ;
425436 Ok ( SloshDoc {
You can’t perform that action at this time.
0 commit comments