mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-26 08:24:07 +01:00 
			
		
		
		
	 4cc3b17d36
			
		
	
	4cc3b17d36
	
	
	
		
			
			Mermaid diagrams that have YAML front-matter can now be indented in
HTML code, see commit:
5cfa9196 (fix: support parsing indented mmd YAML from HTML, 2022-11-27)
Some diagrams previously had a mix of tabs/spaces for indentation.
In order for `dedent` to work, these diagrams had to be converted to
using a consistent indentation.
		
	
		
			
				
	
	
		
			99 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			99 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html lang="en">
 | |
|   <head>
 | |
|     <meta charset="utf-8" />
 | |
|     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
 | |
|     <title>Git Graphs Mermaid Quick Test Page</title>
 | |
|     <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
 | |
|     <style>
 | |
|       div.mermaid {
 | |
|         /* font-family: 'trebuchet ms', verdana, arial; */
 | |
|         font-family: 'Courier New', Courier, monospace !important;
 | |
|       }
 | |
|     </style>
 | |
|   </head>
 | |
| 
 | |
|   <body>
 | |
|     <h1>Git diagram demo</h1>
 | |
|     <pre class="mermaid">
 | |
|     ---
 | |
|     title: Simple Git diagram
 | |
|     ---
 | |
|     gitGraph:
 | |
|     options
 | |
|     {
 | |
|     "nodeSpacing": 50,
 | |
|     "nodeRadius": 5
 | |
|     }
 | |
|     end
 | |
|     branch master
 | |
|     commit
 | |
|     branch newbranch
 | |
|     checkout newbranch
 | |
|     commit
 | |
|     commit
 | |
|     checkout master
 | |
|     commit
 | |
|     commit
 | |
|     merge newbranch
 | |
|     </pre>
 | |
| 
 | |
|     <script src="./mermaid.js"></script>
 | |
|     <script>
 | |
|       const ALLOWED_TAGS = [
 | |
|         'a',
 | |
|         'b',
 | |
|         'blockquote',
 | |
|         'br',
 | |
|         'dd',
 | |
|         'div',
 | |
|         'dl',
 | |
|         'dt',
 | |
|         'em',
 | |
|         'foreignObject',
 | |
|         'h1',
 | |
|         'h2',
 | |
|         'h3',
 | |
|         'h4',
 | |
|         'h5',
 | |
|         'h6',
 | |
|         'h7',
 | |
|         'h8',
 | |
|         'hr',
 | |
|         'i',
 | |
|         'li',
 | |
|         'ul',
 | |
|         'ol',
 | |
|         'p',
 | |
|         'pre',
 | |
|         'span',
 | |
|         'strike',
 | |
|         'strong',
 | |
|         'table',
 | |
|         'tbody',
 | |
|         'td',
 | |
|         'tfoot',
 | |
|         'th',
 | |
|         'thead',
 | |
|         'tr',
 | |
|       ];
 | |
|       mermaid.initialize({
 | |
|         theme: 'default',
 | |
|         // themeCSS: '.node rect { fill: red; }',
 | |
|         logLevel: 3,
 | |
|         securityLevel: 'loose',
 | |
|         flowchart: { curve: 'basis' },
 | |
|         gantt: { axisFormat: '%m/%d/%Y' },
 | |
|         sequence: { actorMargin: 50 },
 | |
|         dompurifyConfig: {
 | |
|           USE_PROFILES: {
 | |
|             svg: true,
 | |
|           },
 | |
|           ADD_TAGS: ALLOWED_TAGS,
 | |
|           ADD_ATTR: ['transform-origin'],
 | |
|         },
 | |
|       });
 | |
|     </script>
 | |
|   </body>
 | |
| </html>
 |