|
|
@@ -3439,7 +3439,8 @@ function handleEpisodeContentForAce($originalContent) {
|
|
|
}
|
|
|
|
|
|
// 提取主体列表 - 兼容多种格式
|
|
|
- if (preg_match('/###\s*主体列表\s*\n(.*?)(?=\n\s*###[^#]|\z)/s', $originalContent, $charactersMatch)) {
|
|
|
+ // if (preg_match('/###\s*主体列表\s*\n(.*?)(?=\n\s*###[^#]|\z)/s', $originalContent, $charactersMatch)) {
|
|
|
+ if (preg_match('/###[ \t]*主体列表[ \t]*\r?\n(.*?)(?=###[^#\n]|\z)/s', $originalContent, $charactersMatch)) {
|
|
|
$charactersText = trim($charactersMatch[1]);
|
|
|
$characterLines = explode("\n", $charactersText);
|
|
|
|
|
|
@@ -3550,7 +3551,8 @@ function handleEpisodeContentForAce($originalContent) {
|
|
|
}
|
|
|
|
|
|
// 提取场景列表 - 兼容多种格式
|
|
|
- if (preg_match('/###\s*场景列表\s*\n(.*?)(?=\n\s*###[^#]|\z)/s', $originalContent, $scenesMatch)) {
|
|
|
+ // if (preg_match('/###\s*场景列表\s*\n(.*?)(?=\n\s*###[^#]|\z)/s', $originalContent, $scenesMatch)) {
|
|
|
+ if (preg_match('/###[ \t]*场景列表[ \t]*\r?\n(.*?)(?=###[^#\n]|\z)/s', $originalContent, $scenesMatch)) {
|
|
|
$scenesText = trim($scenesMatch[1]);
|
|
|
$sceneLines = explode("\n", $scenesText);
|
|
|
|
|
|
@@ -3587,7 +3589,7 @@ function handleEpisodeContentForAce($originalContent) {
|
|
|
}
|
|
|
|
|
|
// 提取道具列表 - 兼容多种格式
|
|
|
- if (preg_match('/###\s*道具列表\s*\n(.*?)(?=\n\s*###[^#]|\z)/s', $originalContent, $propsMatch)) {
|
|
|
+ if (preg_match('/###[ \t]*道具列表[ \t]*\r?\n(.*?)(?=###[^#\n]|\z)/s', $originalContent, $propsMatch)) {
|
|
|
$propsText = trim($propsMatch[1]);
|
|
|
$propLines = explode("\n", $propsText);
|
|
|
|
|
|
@@ -3613,12 +3615,10 @@ function handleEpisodeContentForAce($originalContent) {
|
|
|
'description' => $description
|
|
|
];
|
|
|
|
|
|
- // 如果有道具图片提示词,添加到数组中
|
|
|
if ($picPrompt) {
|
|
|
$propData['pic_prompt'] = $picPrompt;
|
|
|
+ $result['props'][] = $propData;
|
|
|
}
|
|
|
-
|
|
|
- $result['props'][] = $propData;
|
|
|
}
|
|
|
}
|
|
|
}
|