diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx
index 4e97765..14c443b 100644
--- a/src/renderer/App.tsx
+++ b/src/renderer/App.tsx
@@ -1,6 +1,6 @@
import { Component, useRef } from 'react';
import { Input } from 'antd';
-import { Button, Flex,Modal, Space } from 'antd';
+import { Button, Flex, Modal, Space } from 'antd';
// import Taro from "@tarojs/taro";
// import {
// View,
@@ -40,6 +40,28 @@ import TextArea from 'antd/es/input/TextArea';
// 
+const createDecoratedTitleHTML = (text: any) => {
+ const padding = 2; // 内容左右两边的空格数
+ const lineChar = '─'; // 水平线字符
+ const edgeChar = '━'; // 边框装饰字符
+ const cornerTopLeft = '╔';
+ const cornerTopRight = '╗';
+ const cornerBottomLeft = '╚';
+ const cornerBottomRight = '╝';
+
+ // 计算标题长度
+ const titleLength = text.length + padding * 2;
+ const lineLength = lineChar.repeat(titleLength);
+ const edgeLength = edgeChar.repeat(titleLength);
+
+ // 构造 HTML
+ const topBorder = `${cornerTopLeft}${edgeLength}${cornerTopRight}`;
+ const bottomBorder = `${cornerBottomLeft}${edgeLength}${cornerBottomRight}`;
+ const middleLine = ` 📢 ${text}`;
+
+ return `
${topBorder}
${middleLine}
${bottomBorder}
\n`;
+};
+
marked.setOptions({
breaks: true, // 是否回车换行
gfm: true, //使用经批准的 GitHub Flavored Markdown (GFM) 规范
@@ -138,7 +160,27 @@ renderer.heading = function (text, level, raw) {
// ignore IDs
// return `📋${text}
`;
// return `🔥${text}
`;
- return `🔥${text}
\n`;
+ if (level == 1) {
+ return createDecoratedTitleHTML(text);
+ } else if (level == 2) {
+ return `🔥${text}
\n`;
+ } else {
+ return `🔥${text}
\n`;
+ }
+
+ return `╔═━──────━═╗
+ 🔥 ${text}
+╚═━──────━═╝
+
\n`;
+
+ // return `* * * * * * * * * * *
+ // * ${text} *
+ // * * * * * * * * * * *
+ //
\n`;
+
+ // return `==================
+ // || 📢 ${text} 📢 ||
+ // ==================
\n`;
// return `🔥${text}\n`;
// return `🔥${text}
`;
@@ -181,7 +223,9 @@ renderer.blockquote = function (quote) {
//
//
// return `\t 👉${content}
`
- return `\t 👉${content}
\n`;
+ // return `\t 📌${content}
\n`; //ok
+ // ├─
+ return ` └─📌${content}
`;
};
renderer.table = function (header, body) {
@@ -271,9 +315,27 @@ const Index = () => {
console.log('onInputtxt--->', onInputtxt?.target?.value);
setinputValue(onInputtxt.target.value);
// console.log('inputValue',inputValue)
+ // let value = onInputtxt?.target?.value;
let value = onInputtxt?.target?.value;
+
if (value) {
- setmarkText(value);
+ // +`🅥🟢🆔:hackrobot`
+ // +`➕🅥=>🟩🆔: hackrobot,可以找我聊天💬 `
+// let contactMe=`
➖➖➖➖➖
在🟩【wΞ𝗫𝗜𝗡】➡️联系我 【➕🅥】:
+// ╭────────────────╮
+// │ 🆔 hackrobot
+// ╰────────────────╯
+// 💬 随时欢迎聊天
+// `
+
+let contactMe=`╭────────────────────╮
+│ 🟩【wΞ𝗫𝗜𝗡】➡️联系我【➕🅥】
+│
+│ 🆔 hackrobot
+│
+│ 💬 随时欢迎聊天
+╰────────────────────╯`
+ setmarkText(value+contactMe);
}
};