Fix detection of ordered list to trim text before checking with regex.
This fixes some ordered lists to be incorrectly recognized as unordered
lists due to trailing whitespace.
Merge pull request #1112 from npomaroli/hotfix-wordlistpaste

Fix detection of ordered list to trim text before checking with regex.