Skip to content

Commit

Permalink
Merge pull request #48 from mayank1513/fix/47-autolink
Browse files Browse the repository at this point in the history
Fix/47 autolink
  • Loading branch information
mayank1513 authored Jul 13, 2024
2 parents 62cabaf + 006a772 commit 52ac2c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Trello Kanban Board

## 0.7.2

### Patch Changes

- 2ec1edb: Fix autolink not detecting - and \_ at the end.

## 0.7.1

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "trello-kanban-task-board",
"private": true,
"version": "0.7.1",
"version": "0.7.2",
"type": "module",
"scripts": {
"dev": "vite --port 3000",
Expand All @@ -22,6 +22,7 @@
"react-color-palette": "^7.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.1",
"react-markdown-autolink": "^0.0.0",
"react-toastify": "^9.1.3",
"react-webgl-trails": "^0.0.4",
"rehype-raw": "^7.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/components/task/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useGlobalState } from "utils/context";
import styles from "./task.module.scss";
import { vscode } from "utils/vscode";
import { ColorSelector } from "components/color-selector";
import { autoLinkMd } from "react-markdown-autolink";

function resizeTextArea(textareaRef: RefObject<HTMLTextAreaElement>) {
const target = textareaRef.current;
Expand Down Expand Up @@ -90,7 +91,7 @@ export default function Task({ task, index }: { task: TaskType; index: number })
{!isEditing &&
(task.description.trim() ? (
<ReactMarkdown rehypePlugins={[rehypeRaw]} remarkPlugins={[remarkGfm]}>
{task.description.replace(/\n+/g, "\n\n")}
{autoLinkMd(task.description.replace(/\n+/g, "\n\n"))}
</ReactMarkdown>
) : (
<p className={styles.placeholder}>Enter task description in Markdown format.</p>
Expand Down

0 comments on commit 52ac2c0

Please sign in to comment.