I do not believe that there is a standard for the level of specification required, and probably this should not be. The Apple Human Interface Guides are the most comprehensive. As for the choice of content (as opposed to controls or discrete data objects), they say:
Double-clicking is most often used as a shortcut for other actions, for example ... to select a word. Pressing it three times selects the next logical block, as determined by the application. In a text document, triple-clicking on a word selects the paragraph containing the word .... Double-clicking on the word selects the word. The choice should provide smart behavior; if the user deletes the selected word, for example, the space after the word must also be deleted ... In some contexts - for example, in a programming language - it may be appropriate to allow users to select both left and right parentheses (or brackets or parentheses) in a pair , as well as all the characters between them, by double-clicking any of them. "(p115-116)
Apple is pretty specific about which characters are not included in the word.
Microsofts Windows User Experience Guide :
For some types of selectable objects, each click increases the effect of the click. For example, a single tap in the text box sets the input location, double tap selects a word and triple press selects a sentence or paragraph. (P430)
Java Swing Look and Feel Design Design Guide :
Double-clicking (double-clicking twice in a row without moving the mouse) is used to select large units (for example, to select a word in a text field) .... Three times (clicking a mouse button three times in a row, without moving the mouse) is used to select more large units (for example, to select the entire line in a text field) .... A triple click on a line of text deselects the existing selection and selects the line.
Gnome's interface guides for people do not talk much about what to do with double and triple clicks.
This gives you the freedom to choose what is best for your users. Double and triple clicks are expert shortcuts, so their behavior should be aimed at maximizing efficiency. Think about why the user chooses something and designs to make it the easiest and fastest.
For example, it is obvious that the rationale for including a finite space by double-clicking on a word is that users usually select a word to copy or paste it to another position in the text. This implies that you automatically include the destination space so that the user cannot manually remove the remaining additional space in the source and add the markup space at the destination.
Similarly, if users select a line of code or paragraph to copy or move elsewhere, then you probably want to include newline characters so that the user does not leave an empty line in the source and manually forcibly add a new line at the destination (provided that they do not want to take a line / paragraph and combine it with another line / paragraph.
If the choice is for something other than copying and moving text in sentences, then none of them can be applied, and you don’t necessarily want to include trailing spaces or newlines. That is why there should not be a standard.
An alternative is what Apple calls smart cuts and pastes (see the Human Interface Guide) or Microsoft Words Smart Cut and Paste, where the algorithms for determining spaces, strings, and other parameters are algorithmically determined when cutting, copying, pasting, and deleting, rather than when choosing.