lbod/dapi — pull request #3 by wkeese (2013-04-13 01:38:29+00:00)
Title: fix trimSummary to work as before, taking first sentence

The (current) API viewer shows a short explanation and a long explanation for each method, event, module, etc. Often the code though just has one block of documentation, ex:

_onDropDownMouseUp: function(/*Event?*/ e){
// summary:
//	Callback on mouseup/touchend after mousedown/touchstart on the arrow icon.
//	Note that this function is called regardless of what node the event occurred on (but only after
//	a mousedown/touchstart on the arrow).
//
//	If the drop down is a simple menu and the cursor is over the menu, we execute it, otherwise, we focus our
//	drop down widget. If the event is missing, then we are not
//	a mouseup event.
//
//	This is useful for the common mouse movement pattern
//	with native browser `` nodes:
//
//	1. mouse down on the select node (probably on the arrow)
//	2. move mouse to a menu item while holding down the mouse button
//	3. mouse up. this selects the menu item as though the user had clicked it.

In that case we want to use the first sentence for the short explanation, and the full text for the long explanation. An alternate approach would be to use the first paragraph. Using the first row of text though doesn't make sense because it may stop in the middle of a sentence.