Skip to content

Commit

Permalink
fix empty cards not ignoring <br>
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Aug 23, 2020
1 parent aadc543 commit fa46ef9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rslib/src/notes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::{
define_newtype,
err::{AnkiError, Result},
notetype::{CardGenContext, NoteField, NoteType, NoteTypeID},
template::field_is_empty,
text::{ensure_string_in_nfc, strip_html_preserving_image_filenames},
timestamp::TimestampSecs,
types::Usn,
Expand Down Expand Up @@ -125,7 +126,7 @@ impl Note {
.iter()
.enumerate()
.filter_map(|(ord, s)| {
if s.trim().is_empty() {
if field_is_empty(s) {
None
} else {
fields.get(ord).map(|f| f.name.as_str())
Expand Down

0 comments on commit fa46ef9

Please sign in to comment.