diff --git a/CHANGELOG.md b/CHANGELOG.md index 87b0cfe..aa4b1ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,8 +27,7 @@ All notable changes to this project will be documented in this file. See [standa ``` ast-grep scan -r sg-rules/0.6.0-rewrite-blank.yml . -i ``` - It's not 100% safe, as it can introduce `,,` in your code, so be careful to - review, clean it up and test. + Be careful to review, clean it up and test. * Switch to mongoengine style field arguments. Drop old django ([#200](https://github.com/MongoEngine/django-mongoengine/issues/200)) ([9d56f6a](https://github.com/MongoEngine/django-mongoengine/commit/9d56f6a58ccee93e2acae7af0a8d81d9aa43ae5b)) diff --git a/sg-rules/0.6.0-rewrite-blank.yml b/sg-rules/0.6.0-rewrite-blank.yml index 8e10dae..b65485b 100644 --- a/sg-rules/0.6.0-rewrite-blank.yml +++ b/sg-rules/0.6.0-rewrite-blank.yml @@ -28,6 +28,6 @@ transform: MAYBE_COMMA: replace: source: $$$A - replace: '^.+' + replace: '^.+[^,]$' by: ', ' fix: fields.$C($$$A$MAYBE_COMMArequired=True)