-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Issue Description
The FEATURE_DIRECTIVE_REGEX in src/drivers/story/utils.ts lacks clear documentation about the expected format and valid usage patterns for feature/slug directives.
Current Implementation
Issue
The regex pattern allows multiple formats but it's unclear what the intended usage should be:
-
Format Variations:
-
Capture Groups:
- Group 1: The actual slug (alphanumeric + underscores/hyphens)
- Group 2: Optional trailing content (purpose unclear)
-
Usage Examples: It's not documented what valid formats are expected or how the trailing content should be handled.
Questions to Clarify
- Expected Format: Should users use or ?
- Trailing Content: What should happen with the second capture group? Is it ignored? Used as description?
- Validation: Are there any restrictions on the slug format beyond the regex pattern?
- Examples: What are some valid and invalid examples of usage?
Proposed Solution
Add comprehensive documentation to clarify:
- Expected Format: Document the standard format for feature/slug directives
- Usage Examples: Provide clear examples of valid usage patterns
- Validation Rules: Specify what constitutes a valid slug
- Behavior: Explain how trailing content is handled
Example documentation to add:
Files to Modify
-
- Add JSDoc documentation for the regex pattern
Priority
Low - Documentation improvement that doesn't affect functionality but helps with developer experience and understanding.
Labels
documentation, story-driver, regex, developer-experience
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels