diff --git a/js/view_function.js b/js/view_function.js index 82cf32f..9568b28 100644 --- a/js/view_function.js +++ b/js/view_function.js @@ -141,21 +141,21 @@ function formatMarkdown(text) { // 複数行インラインコード(バッククォート3つ)を検出して、
で囲む
text = text.replace(/```([\s\S]+?)```/g, (match, code) => {
- const key = `PLACEHOLDER_${placeholderIndex++}`;
+ const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
placeholders[key] = `${code.replace(/^\s*\n/, '')}
`;
return key;
});
// コードブロックの退避
text = text.replace(/`([^`\n]+)`/g, (_, code) => {
- const key = `PLACEHOLDER_${placeholderIndex++}`;
+ const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
placeholders[key] = `${code}`;
return key;
});
// コロンで囲まれた絵文字をプレースホルダーに退避
text = text.replace(/:([a-zA-Z0-9_]+):/g, (match) => {
- const key = `PLACEHOLDER_${placeholderIndex++}`;
+ const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
placeholders[key] = match; // 元の文字列を保存
return key;
});
@@ -192,8 +192,9 @@ function formatMarkdown(text) {
// プレースホルダーを戻す
let final = lines.join('');
for (const key in placeholders) {
- final = final.replace(key, placeholders[key]);
- }
+ const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+ final = final.replace(new RegExp(escapedKey, 'g'), placeholders[key]);
+ }
return final;
}
diff --git a/server/uwuzuinfo.txt b/server/uwuzuinfo.txt
index 2797f44..0246c8a 100644
--- a/server/uwuzuinfo.txt
+++ b/server/uwuzuinfo.txt
@@ -1,4 +1,4 @@
uwuzu
-1.5.1
+1.5.2
2025/05/04
daichimarukana,putonfps
\ No newline at end of file
diff --git a/server/uwuzurelease.txt b/server/uwuzurelease.txt
index 8bbdd10..3a1f959 100644
--- a/server/uwuzurelease.txt
+++ b/server/uwuzurelease.txt
@@ -1,6 +1,10 @@
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
+## Version 1.5.2 (Combeny)
+2025/05/04
+fix: ユーズのMarkdownがもっと上手く働かないどころか崩壊してしまう問題を修正しました!
+
## Version 1.5.1 (Combeny)
2025/05/04
fix: ユーズのMarkdownが上手く働かない問題を修正しました!
diff --git a/update.json b/update.json
index c31b667..2d73f66 100644
--- a/update.json
+++ b/update.json
@@ -1,18 +1,12 @@
{
"software": "uwuzu",
- "version": "1.5.1",
+ "version": "1.5.2",
"release_date": "2025/05/04",
- "release_notes": "このアップデートではタイムラインが正常に表示されない問題やオブジェクトストレージプラグイン有効時に特定の条件下で正常に使用できない問題など、いくつかのバグ修正が行われています。詳細はリリースノートをご覧ください。",
+ "release_notes": "このアップデートではユーズのMarkdown解析が正常に行われないバグの修正が行われています。詳細はリリースノートをご覧ください。",
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
"files": {
"overwrite": [
- "/admin/addadmin.php",
- "/admin/index.php",
- "/admin/setup_db_php.php",
- "/admin/setup_uwuzu_db.php",
- "/admin/success.php",
"/js/view_function.js",
- "/new.php",
"/server/uwuzuabout.txt",
"/server/uwuzuinfo.txt",