mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-27 07:46:25 +00:00
feat(core): tags and types are names, one type per page implying a tag
Tags no longer have pages. A page has at most one type, which implies a tag of the same name. Tags are stored sorted. Adds rename_tag and remove_tag. Schema v6 turns tag pages into notes and trims types to the first one. History exports synapse-type:: and reads the old forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39e7e43071
commit
e2ed9054c6
11 files changed
+373
-328
No files matched your search
@@ -53,7 +53,6 @@ fn atomic<T>(graph: &Graph, f: impl FnOnce() -> Result<T>) -> Result<T> {
|
||||
struct Plan {
|
||||
page: PageId,
|
||||
is_hub: bool,
|
||||
is_tag: bool,
|
||||
description: String,
|
||||
/// Titles of the hubs the page belongs to.
|
||||
hubs: Vec<String>,
|
||||
@@ -172,7 +171,6 @@ fn plan(graph: &Graph, title: &str, parsed: &ParsedPage, steal: bool) -> Result<
|
||||
Ok(Plan {
|
||||
page: page.id,
|
||||
is_hub: parsed.is_hub,
|
||||
is_tag: parsed.is_tag,
|
||||
description: parsed.description.clone(),
|
||||
hubs: parsed.hubs.clone(),
|
||||
tags: parsed.tags.clone(),
|
||||
@@ -223,8 +221,6 @@ fn apply_kind(graph: &Graph, plan: &Plan) -> Result<bool> {
|
||||
};
|
||||
let kind = if plan.is_hub {
|
||||
PageKind::Hub
|
||||
} else if plan.is_tag {
|
||||
PageKind::Tag
|
||||
} else {
|
||||
PageKind::Note
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user