minor cleanup

This commit is contained in:
Alex Yatskov 2019-03-07 10:19:35 -08:00
parent 77a558fc31
commit ee7b158cc9
2 changed files with 6 additions and 7 deletions

View File

@ -520,7 +520,7 @@ class AnkiConnect:
self.window().unloadProfileAndShowProfileManager()
self.loadProfile(name)
return True
@api()
def sync(self):
@ -716,7 +716,7 @@ class AnkiConnect:
for field in audio['fields']:
if field in ankiNote:
ankiNote[field] += u'[sound:{}]'.format(audioFilename)
except Exception as e:
errorMessage = str(e).replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
for field in audio['fields']:
@ -869,7 +869,7 @@ class AnkiConnect:
for field in inOrderFields:
fm = mm.newField(_(field))
mm.addField(m, fm)
# Add shared css to model if exists. Use default otherwise
if (css is not None):
m['css'] = css

View File

@ -728,10 +728,10 @@ guarantee that your application continues to function properly in the future.
```
**Create new Model**
**Create New Model**
Creates a new model to be used in Anki. User must provide modelName, inOrderFields and cardTemplates to be used
in the model.
Creates a new model to be used in Anki. User must provide the `modelName`, `inOrderFields` and `cardTemplates` to be
used in the model.
*Sample request*
```json
@ -821,7 +821,6 @@ guarantee that your application continues to function properly in the future.
}
```
#### Notes ####
* **addNote**