Skip to content

Commit

Permalink
fix(DownView): 🐛 Don't forget to join('- ') after splitting (fix #189)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Dec 3, 2021
1 parent f6d83d1 commit 60df361
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Components/Down.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@
lines = index
.split("\n")
.map((line) => line.split("- "))
.filter((pair) => pair.length > 1) as [string, string][];
.map((line) => {
const pair = line.split("- ");
return [pair[0], pair.slice(1).join("- ")] as [string, string];
})
.filter((pair) => pair[1] !== "");
}
</script>

Expand Down

0 comments on commit 60df361

Please sign in to comment.