I ran into this when trying to use ActiveRecord's Array serialization. Since the tweak_default regexes were only matching against non-newline characters, newlines in the default value for a string column mean you get hosed with ActiveRecord::SerializationTypeMismatch. This is since sqlite3 thinks the default value is "'--- \n'" instead of "--- \n".
I'm happy to change things about this patch if there are tweaks you'd like to see. Let me know.
Handle trailing newline in default strings