def addPlugDefinitionToDoc( doc, plugName, plugDescription, plugType, plugDepth ):
	#asciidoc uses '::',':::','::::' to define term:definiton indent level
	indentLevel = (':' * plugDepth) + ':'
	#however it only offers those three levels. so for more we have to use ';;'
	if plugDepth > 3:
		indentLevel = ';;'

	if plugDescription == "":
		plugDescription = __PLACEHOLDERSTRING

	# remove any newlines in description to avoid formatting problems
	# TODO - remove this and find a better way of handling formatting in description strings
	plugDescription = plugDescription.replace('\n',' ')

	#include the plug type, then the wordy description. wrap description in an explicit <p> to split it onto a new line
	plugDescription = "`%s`+++<p>+++%s+++</p>+++" % ( plugType, plugDescription)

	string = "%s%s %s\n" % (plugName, indentLevel, plugDescription)

	doc.write(string)
dataset/ETHPy150Open ImageEngine/gaffer/contrib/doc/GafferNodeReference/dynamicContentGenerators/nodeDescriptionGenerator.py/addPlugDefinitionToDoc/original