MCPcopy Create free account
hub / github.com/deepnote/deepnote / sanitizeWidth

Function sanitizeWidth

packages/blocks/src/blocks/image-blocks.ts:12–16  ·  view source on GitHub ↗
(width: string)

Source from the content-addressed store, hash-verified

10}
11
12function sanitizeWidth(width: string): string {
13 // Extract only numeric characters
14 const numericWidth = width.replace(/[^0-9]/g, '')
15 return numericWidth || ''
16}
17
18function sanitizeAlignment(alignment: string): string {
19 // Only allow specific alignment values

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected