feat: better layout in a lot of places
This commit is contained in:
@@ -2,7 +2,7 @@ import { parseDocument, renderMarkdown } from "@lib/documents.ts";
|
||||
import { parse } from "yaml";
|
||||
import { createCrud } from "@lib/crud.ts";
|
||||
import { stringify } from "https://deno.land/std@0.194.0/yaml/stringify.ts";
|
||||
import { formatDate } from "@lib/string.ts";
|
||||
import { extractHashTags, formatDate } from "@lib/string.ts";
|
||||
import { fixRenderedMarkdown } from "@lib/helpers.ts";
|
||||
|
||||
export type Article = {
|
||||
@@ -80,10 +80,9 @@ function parseArticle(original: string, id: string): Article {
|
||||
}
|
||||
|
||||
let content = original.slice(range[0], range[1]);
|
||||
const tags = [];
|
||||
for (const [hashtag] of original.matchAll(/\B(\#[a-zA-Z\-]+\b)(?!;)/g)) {
|
||||
tags.push(hashtag.replace(/\#/g, ""));
|
||||
content = content.replace(hashtag, "");
|
||||
const tags = extractHashTags(content);
|
||||
for (const tag of tags) {
|
||||
content = content.replace("#" + tag, "");
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user