@dantveita @WhiteNoise I can confirm the strange behavior of aText in current Obsidian release on macOS v10.14.6. It happens every time when the snippet’s text contains newlines. Then it expands into seemingly random number of last characters of the previous paragraph, like the OP describes. Cursor placement after expanding is also incorrect.
@WhiteNoise I do consider the behaviur as a bug in Obsidian, because toggling the Editor settings “Strict line breaks” and “Auto convert HTML” changes the expansion behavior, but only until next restart of Obsidian.
As far as I can tell, aText emulates keyboard for short snippets, and uses Clipboard for longer ones (can be adjusted in settings), but in my experience only newlines in snippet text make difference in expansion behavior.
UPDATE: Increasing min. text length in aText settings to force aText to use Clipboard seems to sove the issue.