(body: string, head = '')
| 38 | 'pre.__art_text{margin:0;padding:24px;white-space:pre-wrap;word-break:break-word;font:14px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;}'; |
| 39 | |
| 40 | function htmlShell(body: string, head = ''): string { |
| 41 | return `<!doctype html> |
| 42 | <html lang="en"> |
| 43 | <head> |
| 44 | <meta charset="utf-8"> |
| 45 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
| 46 | <title>QodeX Artifact Preview</title> |
| 47 | <style>${BASE_STYLE}</style> |
| 48 | ${head} |
| 49 | </head> |
| 50 | <body> |
| 51 | ${body} |
| 52 | </body> |
| 53 | </html>`; |
| 54 | } |
| 55 | |
| 56 | function escapeHtml(s: string): string { |
| 57 | return s.replace(/[&<>]/g, c => (c === '&' ? '&' : c === '<' ? '<' : '>')); |
no outgoing calls
no test coverage detected