FIX: couldn't start a 4-spaces block on the first line of a post

This commit is contained in:
Régis Hanol
2014-09-02 01:18:06 +02:00
parent 22fbae8556
commit 61db6c95d2
4 changed files with 14 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ class PostRevisor
def revise!(editor, new_raw, opts = {})
@editor = editor
@opts = opts
@new_raw = TextCleaner.normalize_whitespaces(new_raw).strip
@new_raw = TextCleaner.normalize_whitespaces(new_raw).gsub(/\s+\z/, "")
# TODO this is not in a transaction - dangerous!
return false unless should_revise?