mirror of
				https://github.com/kovetskiy/mark.git
				synced 2025-10-31 19:57:36 +08:00 
			
		
		
		
	Undo unrelated formatting changes
This commit is contained in:
		
							parent
							
								
									0f13d249f5
								
							
						
					
					
						commit
						f6b63aab86
					
				
							
								
								
									
										30
									
								
								util/cli.go
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								util/cli.go
									
									
									
									
									
								
							| @ -132,10 +132,7 @@ func processFile( | ||||
| 	} | ||||
| 
 | ||||
| 	if pageID == "" && meta == nil { | ||||
| 		fatalErrorHandler.Handle( | ||||
| 			nil, | ||||
| 			"specified file doesn't contain metadata and URL is not specified via command line or doesn't contain pageId GET-parameter", | ||||
| 		) | ||||
| 		fatalErrorHandler.Handle(nil, "specified file doesn't contain metadata and URL is not specified via command line or doesn't contain pageId GET-parameter") | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| @ -146,10 +143,7 @@ func processFile( | ||||
| 		} | ||||
| 
 | ||||
| 		if meta.Title == "" { | ||||
| 			fatalErrorHandler.Handle( | ||||
| 				nil, | ||||
| 				"page title is not set: use the 'Title' header, or the --title-from-h1 / --title-from-filename flags", | ||||
| 			) | ||||
| 			fatalErrorHandler.Handle(nil, "page title is not set: use the 'Title' header, or the --title-from-h1 / --title-from-filename flags") | ||||
| 			return nil | ||||
| 		} | ||||
| 	} | ||||
| @ -226,11 +220,11 @@ func processFile( | ||||
| 		} | ||||
| 
 | ||||
| 		cfg := types.MarkConfig{ | ||||
| 			MermaidScale:  cmd.Float("mermaid-scale"), | ||||
| 			D2Scale:       cmd.Float("d2-scale"), | ||||
| 			DropFirstH1:   cmd.Bool("drop-h1"), | ||||
| 			StripNewlines: cmd.Bool("strip-linebreaks"), | ||||
| 			Features:      cmd.StringSlice("features"), | ||||
| 			MermaidScale:    cmd.Float("mermaid-scale"), | ||||
| 			D2Scale:         cmd.Float("d2-scale"), | ||||
| 			DropFirstH1:     cmd.Bool("drop-h1"), | ||||
| 			StripNewlines:   cmd.Bool("strip-linebreaks"), | ||||
| 			Features:        cmd.StringSlice("features"), | ||||
| 		} | ||||
| 		html, _ := mark.CompileMarkdown(markdown, stdlib, file, cfg) | ||||
| 		fmt.Println(html) | ||||
| @ -305,11 +299,11 @@ func processFile( | ||||
| 		) | ||||
| 	} | ||||
| 	cfg := types.MarkConfig{ | ||||
| 		MermaidScale:  cmd.Float("mermaid-scale"), | ||||
| 		D2Scale:       cmd.Float("d2-scale"), | ||||
| 		DropFirstH1:   cmd.Bool("drop-h1"), | ||||
| 		StripNewlines: cmd.Bool("strip-linebreaks"), | ||||
| 		Features:      cmd.StringSlice("features"), | ||||
| 		MermaidScale:    cmd.Float("mermaid-scale"), | ||||
| 		D2Scale:         cmd.Float("d2-scale"), | ||||
| 		DropFirstH1:     cmd.Bool("drop-h1"), | ||||
| 		StripNewlines:   cmd.Bool("strip-linebreaks"), | ||||
| 		Features:        cmd.StringSlice("features"), | ||||
| 	} | ||||
| 
 | ||||
| 	html, inlineAttachments := mark.CompileMarkdown(markdown, stdlib, file, cfg) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dennis Verheijden
						Dennis Verheijden