Skip to content

Treat --- as text when not valid config delimiter - #47

Merged
csansoon merged 1 commit into
mainfrom
ignore-non-config-dashes
Feb 2, 2026
Merged

Treat --- as text when not valid config delimiter#47
csansoon merged 1 commit into
mainfrom
ignore-non-config-dashes

Conversation

@csansoon

@csansoon csansoon commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Summary

PromptL now intelligently treats --- as regular text when it cannot be a valid config section delimiter, eliminating unnecessary errors.

Previously, any occurrence of --- in a document would be parsed as a config delimiter, forcing users to escape it as \--- even in cases where it clearly couldn't be config (e.g., after the config section was already closed, or when there was content before it).

With this change:

  • --- appearing after a config section has been closed is treated as text
  • --- appearing after any substantive content (text, tags, mustache expressions) is treated as text
  • Comments and whitespace before --- still allow it to be parsed as config

This aligns parsing behavior with the specification that config must be at the top of the file, making prompt authoring more intuitive.

## Summary
PromptL now intelligently treats `---` as regular text when it cannot be a valid config section delimiter, eliminating unnecessary errors.

Previously, any occurrence of `---` in a document would be parsed as a config delimiter, forcing users to escape it as `\---` even in cases where it clearly couldn't be config (e.g., after the config section was already closed, or when there was content before it).

With this change:
- `---` appearing after a config section has been closed is treated as text
- `---` appearing after any substantive content (text, tags, mustache expressions) is treated as text
- Comments and whitespace before `---` still allow it to be parsed as config

This aligns parsing behavior with the specification that config must be at the top of the file, making prompt authoring more intuitive.
@csansoon
csansoon force-pushed the ignore-non-config-dashes branch from 7cf9026 to d6dda7c Compare February 2, 2026 10:41
@csansoon
csansoon merged commit 6ea8208 into main Feb 2, 2026
3 checks passed
@csansoon
csansoon deleted the ignore-non-config-dashes branch February 2, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants