Skip to content

Commit

Permalink
Remove InlineMarkdown component
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinez committed Jul 1, 2024
1 parent 96042be commit dbba1f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 44 deletions.
42 changes: 0 additions & 42 deletions src/components/InlineMarkdown.svelte

This file was deleted.

11 changes: 9 additions & 2 deletions src/views/projects/Source/ProjectNameHeader.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
<script lang="ts">
import type { BaseUrl, Project } from "@http-client";
import dompurify from "dompurify";
import { markdownWithExtensions } from "@app/lib/markdown";
import { twemoji } from "@app/lib/utils";
import Badge from "@app/components/Badge.svelte";
import CloneButton from "@app/views/projects/Header/CloneButton.svelte";
import IconSmall from "@app/components/IconSmall.svelte";
import Id from "@app/components/Id.svelte";
import InlineMarkdown from "@app/components/InlineMarkdown.svelte";
import Link from "@app/components/Link.svelte";
import SeedButton from "@app/views/projects/Header/SeedButton.svelte";
import Share from "@app/views/projects/Share.svelte";
export let project: Project;
export let baseUrl: BaseUrl;
export let seeding: boolean;
function render(content: string): string {
return dompurify.sanitize(
markdownWithExtensions.parseInline(content) as string,
);
}
</script>

<style>
Expand Down Expand Up @@ -94,5 +101,5 @@
</div>
</div>
<div class="description" use:twemoji>
<InlineMarkdown fontSize="regular" content={project.description} />
{render(project.description)}
</div>

0 comments on commit dbba1f5

Please sign in to comment.