Skip to content

Commit

Permalink
fix tags; drop log
Browse files Browse the repository at this point in the history
  • Loading branch information
cloverich committed Dec 3, 2024
1 parent a3ef665 commit e1b4b30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/preload/client/importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,14 +626,16 @@ export class ImporterClient {
// 1. Find and collect all ofmTags, so they can be added to front matter
// 2. Convert ofmTags to text nodes otherwise later Slate will choke on them, since
// Chronicles does not (yet) natively support inline tags
// todo(test): Tag with #hash remains in document; tag without hash is stored in db
private processAndConvertTags = (
mdast: mdast.Content | mdast.Root,
tags: string[] = [],
): string[] => {
if (mdast.type === "ofmTag") {
(mdast as any).type = "text";
mdast.value = mdast.value;
tags.push(mdast.value);
const tag = mdast.value; // without hash
mdast.value = `#${mdast.value}`;
tags.push(tag);
return tags;
} else {
if ("children" in mdast) {
Expand Down
1 change: 0 additions & 1 deletion src/preload/client/importer/FilesImportResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ export class FilesImportResolver {

try {
await this.filesclient.copyFile(sourcePathResolved, destinationFile);
console.log("moving to completed", chroniclesId);
await this.knex("import_files")
.where({ chroniclesId })
.update({ status: "complete", error: null });
Expand Down

0 comments on commit e1b4b30

Please sign in to comment.