Skip to main content

shell_comment_lines

Function shell_comment_lines 

Source
pub fn shell_comment_lines(comment: &str) -> Vec<String>
Expand description

Split a TypeScript comment into shell comment bodies (the # prefix is added by the caller).

  • // text yields text with one optional leading space removed.
  • /* ... */ blocks additionally drop the per-line JSDoc * markers (plus one following space or tab), so /** ... */ renders as plain text instead of leaking * prefixes into the generated script.
  • Blank lines inside block comments are dropped; a comment with no remaining content yields no lines.