mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	fix: doc command not displaying correct subdocs when using shorthand api doc access
This commit is contained in:
		
							parent
							
								
									5b4b055c6c
								
							
						
					
					
						commit
						48a06f8022
					
				| @ -34,18 +34,18 @@ Available sections: ]] .. table.concat(modules, ', ') | |||||||
| 		local funcdocs = nil | 		local funcdocs = nil | ||||||
| 		local subdocName = args[2] | 		local subdocName = args[2] | ||||||
| 		if not f then | 		if not f then | ||||||
| 			-- assume subdir |  | ||||||
| 			-- dataDir/docs/<mod>/<mod>.md |  | ||||||
| 			moddocPath = moddocPath .. mod .. '/' | 			moddocPath = moddocPath .. mod .. '/' | ||||||
| 			if not subdocName then | 			if not subdocName then | ||||||
| 				subdocName = '_index' | 				subdocName = '_index' | ||||||
| 			end | 			end | ||||||
| 			f = io.open(moddocPath .. subdocName .. '.md', 'rb') | 			f = io.open(moddocPath .. subdocName .. '.md', 'rb') | ||||||
|  | 			local oldmoddocPath | ||||||
| 			if not f then | 			if not f then | ||||||
| 				f = io.open(moddocPath .. subdocName:match '%w+' .. '/' .. subdocName .. '.md', 'rb') | 				moddocPath = moddocPath .. subdocName:match '%w+' .. '/' | ||||||
|  | 				f = io.open(moddocPath .. subdocName .. '.md', 'rb') | ||||||
| 			end | 			end | ||||||
| 			if not f then | 			if not f then | ||||||
| 				moddocPath = moddocPath .. subdocName .. '/' | 				moddocPath = oldmoddocPath .. subdocName .. '/' | ||||||
| 				subdocName = args[3] or '_index' | 				subdocName = args[3] or '_index' | ||||||
| 				f = io.open(moddocPath .. subdocName .. '.md', 'rb') | 				f = io.open(moddocPath .. subdocName .. '.md', 'rb') | ||||||
| 			end | 			end | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user