Skip to content

Commit

Permalink
fix: do not read paragraphs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed Feb 18, 2024
1 parent 54e004a commit 3198c04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/parser/DeckParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ export class DeckParser {

const toggleList = this.extractToggleLists(dom);
const paragraphs = this.extractCardsFromParagraph(dom);
let cards: Note[] = [...this.extractCards(dom, toggleList), ...paragraphs];
let cards: Note[] = this.extractCards(dom, toggleList);

// Note: this is a fallback behaviour until we can provide people more flexibility on picking non-toggles
if (cards.length === 0) {
cards.push(...this.extractCardsFromLists(dom));
cards.push(...[...this.extractCardsFromLists(dom), ...paragraphs]);
}

// Prevent bad cards from leaking out
Expand Down

0 comments on commit 3198c04

Please sign in to comment.