dont remove more lines than exist in the whole text
wrap appendRevision in try-catch block
be more strict in checkRep
Merge pull request #2364 from webzwo0i/sanity-in-atext

dont remove more lines than exist in the whole text