forked from promptdriven/pdd
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Bug
xml_tagger produces malformed output when given an empty string as content. When calling the tag function with content="", it wraps the empty string but produces duplicate closing tags.
Reproduction
from pdd.xml_tagger import wrap_xml
result = wrap_xml("test_tag", "")
# Expected: <test_tag></test_tag>
# Actual: <test_tag></test_tag></test_tag>Failing Test
# tests/test_xml_tagger.py
def test_empty_content_wrapping():
from pdd.xml_tagger import wrap_xml
result = wrap_xml("test_tag", "")
assert result == "<test_tag></test_tag>", f"Got: {result}"Dev Unit
- Module:
xml_tagger - Prompt:
prompts/xml_tagger_python.prompt - Code:
pdd/xml_tagger.py - Test:
tests/test_xml_tagger.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels