Skip to content

Commit

Permalink
Add the <!DOCTYPE> declaration and the UTF-8 encoding attribute (#55)
Browse files Browse the repository at this point in the history
* Add the <!DOCTYPE> declaration and the UTF-8 encoding attribute

* Modify the HTML charset tag for better compatibility

See #55 (comment)
  • Loading branch information
Ivan1248 authored Apr 26, 2024
1 parent 2a5de58 commit 527b3bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ const MERMAID_STYLESHEET = `
}
`;

const htmlTemplate = (stylesheet: string, body: string, title: string) => `<html>
const htmlTemplate = (stylesheet: string, body: string, title: string) => `<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>${title}</title>
<style>
${MERMAID_STYLESHEET}
Expand Down

0 comments on commit 527b3bc

Please sign in to comment.