mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: couldn't start a 4-spaces block on the first line of a post
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user