chore(sf): follow-up docstring tweaks in doctor.ts
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f4b584e53
commit
3dfc60e04b
1 changed files with 7 additions and 3 deletions
|
|
@ -104,9 +104,13 @@ export {
|
|||
const TITLE_DELIMITER_RE = /[\u2014\u2013/]/; // em dash, en dash, forward slash
|
||||
|
||||
/**
|
||||
* Check whether a milestone or slice title contains characters that conflict
|
||||
* with SF's state document delimiter conventions.
|
||||
* Returns a human-readable description of the problem, or null if the title is safe.
|
||||
* Validate milestone/slice title against SF state document delimiters.
|
||||
*
|
||||
* Flags titles containing em/en dashes or forward slashes, which corrupt
|
||||
* state documents and branch names. Returns human-readable error or null if safe.
|
||||
*
|
||||
* @param title \u2014 the milestone or slice title to validate
|
||||
* @returns error description or null if title is safe
|
||||
*/
|
||||
export function validateTitle(title: string): string | null {
|
||||
if (TITLE_DELIMITER_RE.test(title)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue