diff --git a/src/Entity/Note.php b/src/Entity/Note.php index 6d8c407..c85f64f 100644 --- a/src/Entity/Note.php +++ b/src/Entity/Note.php @@ -67,10 +67,10 @@ class Note $note->mediaInfo = $note->parseMediaInfo($note->fields['Notes']); // Set VocabKanji field - $terms = Term::fromNoteFields($note->fields); + $note->terms = Term::fromNoteFields($note->fields); // If not defined, find them from the highlighted parts in the sentence - if (empty($terms)) { + if (empty($note->terms)) { // 1. Get all spans in the text preg_match_all( self::HIGHLIGHT_PATTERN, @@ -90,8 +90,6 @@ class Note } } - if (empty($terms)) dd($note); - // Set to null whatever is null $readings = array_map( fn($x) => in_array($x, ['_', '_', '']) ? null : $x,