Skip to content

Commit

Permalink
api: filter for double spaces
Browse files Browse the repository at this point in the history
emergency bug fix
  • Loading branch information
resucutie committed Dec 7, 2024
1 parent cf589be commit f7df0d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/api/writable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Map<String, dynamic> rebase(Map<String, dynamic> raw) {
file["id"] = index.toString();

file["tags"] = (file["tags"] as String).split(" ")
.where((tag) => !TagText(tag).isMetatag()) //remove any metatags on the tags
.where((tag) => tag.isNotEmpty // remove empty spaces
&& !TagText(tag).isMetatag() //remove any metatags on the tags
)
.join(" ");
file["related"] = (file["related"] ?? []).where((e) => int.tryParse(e) != null && files.elementAtOrNull(int.parse(e)) != null).toList();

Expand Down

0 comments on commit f7df0d3

Please sign in to comment.