Spaces:
Runtime error
Runtime error
Leonardo
commited on
Update scripts/frontmatter_tool.py
Browse files
scripts/frontmatter_tool.py
CHANGED
|
@@ -136,8 +136,8 @@ class FrontmatterGeneratorTool(Tool):
|
|
| 136 |
|
| 137 |
# Special handling for TextInspectorTool output
|
| 138 |
if content.startswith("Document content:"):
|
| 139 |
-
content = content[len("Document content:")
|
| 140 |
-
|
| 141 |
# Process based on mode
|
| 142 |
try:
|
| 143 |
if mode == "extract":
|
|
@@ -399,3 +399,4 @@ class FrontmatterGeneratorTool(Tool):
|
|
| 399 |
|
| 400 |
# Combine frontmatter with content
|
| 401 |
return frontmatter + clean_content
|
|
|
|
|
|
| 136 |
|
| 137 |
# Special handling for TextInspectorTool output
|
| 138 |
if content.startswith("Document content:"):
|
| 139 |
+
content = content[len("Document content:"):].strip()
|
| 140 |
+
|
| 141 |
# Process based on mode
|
| 142 |
try:
|
| 143 |
if mode == "extract":
|
|
|
|
| 399 |
|
| 400 |
# Combine frontmatter with content
|
| 401 |
return frontmatter + clean_content
|
| 402 |
+
|