Commits

Geoffrey Sneddon committed 60b6b83

Strip leading/trailing hyphens from ID gen (leading/trailing whitespace/hyphens).

Comments (0)

Files changed (1)

 		if not source[0].isalpha():
 			source = u"x" + source
 	else:
-		source = spacesRegex.sub(u"-", source)
+		source = spacesRegex.sub(u"-", source).strip(u"-")
 	
 	# Initally set the id to the source
 	id = source