Tuk Bredsdorff avatar Tuk Bredsdorff committed 03698e2

Show message if no docs found.

Comments (0)

Files changed (2)


 import re
 html_path = '{0}/docs/html-lua/html'.format(env['TM_MOAI_SDK'])
+no_docs_message = '<p>No documentation found for "{0}".</p>'
 def mangle_name(name):
 		Returns a html snippet.
-	return class_info(current_word) or method_info(current_word)
+	result = class_info(current_word) or method_info(current_word)
+	return result if result is not None else no_docs_message.format(current_word)
 def class_info(name):


 	assert find_docs('setViewport').find(
 		'Set the viewport to be used for fitting.'
 	) != -1
+	assert find_docs('XXX').find('No documentation found') != -1
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.