Use margins at the document level (versus indent) in default styles (#67)

* Use margins at the document level (versus indent) in default styles

* Fix tests per the style changes in the previous commit
This commit is contained in:
Christian Rocha
2020-05-21 17:03:59 +02:00
committed by GitHub
parent fe80668412
commit e859bb067c
12 changed files with 91 additions and 89 deletions
+4 -4
View File
@@ -14,7 +14,7 @@ var (
BlockPrefix: "\n",
BlockSuffix: "\n",
},
Indent: uintPtr(2),
Margin: uintPtr(2),
},
BlockQuote: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{},
@@ -122,7 +122,7 @@ var (
BlockSuffix: "\n",
Color: stringPtr("252"),
},
Indent: uintPtr(2),
Margin: uintPtr(2),
},
BlockQuote: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{},
@@ -335,7 +335,7 @@ var (
BlockSuffix: "\n",
Color: stringPtr("234"),
},
Indent: uintPtr(2),
Margin: uintPtr(2),
},
BlockQuote: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{},
@@ -546,7 +546,7 @@ var (
BlockPrefix: "\n",
BlockSuffix: "\n",
},
Indent: uintPtr(2),
Margin: uintPtr(2),
},
BlockQuote: ansi.StyleBlock{
StylePrimitive: ansi.StylePrimitive{},
+1 -1
View File
@@ -2,7 +2,7 @@
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"indent": 2
"margin": 2
},
"block_quote": {
"indent": 1,
+1 -1
View File
@@ -3,7 +3,7 @@
"block_prefix": "\n",
"block_suffix": "\n",
"color": "252",
"indent": 2
"margin": 2
},
"block_quote": {
"indent": 1,
+1 -1
View File
@@ -3,7 +3,7 @@
"block_prefix": "\n",
"block_suffix": "\n",
"color": "234",
"indent": 2
"margin": 2
},
"block_quote": {
"indent": 1,
+1 -1
View File
@@ -2,7 +2,7 @@
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"indent": 2
"margin": 2
},
"block_quote": {
"indent": 1,
+3 -3
View File
@@ -1,6 +1,6 @@
 If you want to make a more significant change, please first open an issue     
 https://github.com/twpayne/chezmoi/issues/new to discuss the change that you  
 want to make. Dave Cheney gives a good rationale                              
 If you want to make a more significant change, please first open an issue   
 https://github.com/twpayne/chezmoi/issues/new to discuss the change that you
 want to make. Dave Cheney gives a good rationale                            
 https://dave.cheney.net/2019/02/18/talk-then-code as to why this is important.
+8 -8
View File
@@ -1,10 +1,10 @@
                                                                              
 • Getting started                                                             
 • Developing locally                                                          
 • Documentation changes                                                       
 • Contributing changes                                                        
 • Managing releases                                                           
 • Packaging                                                                   
 • Updating the website                                                        
                                                                            
 • Getting started                                                           
 • Developing locally                                                        
 • Documentation changes                                                     
 • Contributing changes                                                      
 • Managing releases                                                         
 • Packaging                                                                 
 • Updating the website                                                      
+11 -11
View File
@@ -1,13 +1,13 @@
                                                                              
  DISTRIBUTION │ ARCHITECTURES │ PACKAGE                    
 ───────────────┼────────────────────────────────┼──────────                   
  Debian │ amd64, arm64, armel, i386, │ deb                    
  │ ppc64, ppc64le │                    
  RedHat │ aarch64, armhfp, i686, ppc64, │ rpm                    
  │ ppc64le, x86_64 │                    
  OpenSUSE │ aarch64, armhfp, i686, ppc64, │ rpm                    
  │ ppc64le, x86_64 │                    
  Ubuntu │ amd64, arm64, armel, i386, │ deb                    
  │ ppc64, ppc64le │                    
                                                                            
  DISTRIBUTION │ ARCHITECTURES │ PACKAGE                  
 ───────────────┼────────────────────────────────┼──────────                 
  Debian │ amd64, arm64, armel, i386, │ deb                  
  │ ppc64, ppc64le │                  
  RedHat │ aarch64, armhfp, i686, ppc64, │ rpm                  
  │ ppc64le, x86_64 │                  
  OpenSUSE │ aarch64, armhfp, i686, ppc64, │ rpm                  
  │ ppc64le, x86_64 │                  
  Ubuntu │ amd64, arm64, armel, i386, │ deb                  
  │ ppc64, ppc64le │                  

+4 -4
View File
@@ -1,6 +1,6 @@
                                                                              
 • Navigation                                                                  
   • Familiar shortcuts (arrows, ~, -, @), quick reference                     
                                                                               
                                                                            
 • Navigation                                                                
   • Familiar shortcuts (arrows, ~, -, @), quick reference                   
                                                                             
+18 -17
View File
@@ -1,20 +1,21 @@
                                                                              
  DEPENDENCY │ INSTALLATION │ OPERATION         
                                                                            
  DEPENDENCY │ INSTALLATION │ OPERATION       
 ─────────────────────────────────┼──────────────┼─────────────────────────────────
  xdg-open (Linux), open(1) │ base │ desktop opener              
  (macOS), cygstart (Cygwin) │ │                             
  file, coreutils (cp, mv, rm), │ base │ file type, copy, move and   
  xargs │ │ remove                      
  tar, (un)zip [atool/bsdtar for │ base │ create, list, extract tar,  
  more formats] │ │ gzip, bzip2, zip            
  archivemount, fusermount(3) │ optional │ mount, unmount archives     
  sshfs, rclone, fusermount(3) │ optional │ mount, unmount remotes      
  trash-cli │ optional │ trash files (default action:
  │ │ rm)                         
  vlock (Linux), bashlock │ optional │ terminal locker (fallback:  
  (macOS), lock(1) (BSD) │ │ cmatrix)                    
  advcpmv (Linux) (integration) │ optional │ copy, move progress         
  $VISUAL (else $EDITOR), │ optional │ fallback vi, less, sh       
  $PAGER, $SHELL │ │                             
  xdg-open (Linux), open(1) │ base │ desktop opener            
  (macOS), cygstart (Cygwin) │ │                           
  file, coreutils (cp, mv, rm), │ base │ file type, copy, move and 
  xargs │ │ remove                    
  tar, (un)zip [atool/bsdtar for │ base │ create, list, extract tar,
  more formats] │ │ gzip, bzip2, zip          
  archivemount, fusermount(3) │ optional │ mount, unmount archives   
  sshfs, rclone, fusermount(3) │ optional │ mount, unmount remotes    
  trash-cli │ optional │ trash files (default      
 action:                                                                  
  │ │ rm)                       
  vlock (Linux), bashlock │ optional │ terminal locker (fallback:
  (macOS), lock(1) (BSD) │ │ cmatrix)                  
  advcpmv (Linux) (integration) │ optional │ copy, move progress       
  $VISUAL (else $EDITOR), │ optional │ fallback vi, less, sh     
  $PAGER, $SHELL │ │                           

+1 -1
View File
@@ -1,3 +1,3 @@
 Example:  <some directory>                                                    
 Example:  <some directory>                                                  
+38 -37
View File
@@ -1,39 +1,40 @@
  Gold                                                                         
                                                                               
 Render markdown on the CLI, with pizzazz!                                     
                                                                               
 ## What is it?                                                                
                                                                               
 Gold is a Golang library that allows you to use JSON based stylesheets to     
 render Markdown files in the terminal. Just like CSS, you can define color and
 style attributes on Markdown elements. The difference is that you use ANSI    
 color and terminal codes instead of CSS properties and hex colors.            
                                                                               
 ## Usage                                                                      
                                                                               
 See cmd/gold /cmd/gold/.                                                      
                                                                               
 ## Example Output                                                             
                                                                               
 Image: Gold Dark Style →                                                      
 https://github.com/charmbracelet/gold/raw/master/styles/gallery/dark.png      
                                                                               
 Check out the Gold Style Gallery                                              
 https://github.com/charmbracelet/gold/blob/master/styles/gallery/README.md!   
                                                                               
 ## Colors                                                                     
                                                                               
 Currently  gold  uses the Aurora ANSI colors                                  
 https://godoc.org/github.com/logrusorgru/aurora#Index.                        
                                                                               
 ## Development                                                                
                                                                               
 Style definitions located in  styles/  can be embedded into the binary by     
 running statik https://github.com/rakyll/statik:                              
                                                                               
   statik -f -src styles -include "*.json"                                     
                                                                               
 You can re-generate screenshots of all available styles by running  gallery.sh
 . This requires  termshot  and  pngcrush  installed on your system!           
  Gold                                                                       
                                                                             
 Render markdown on the CLI, with pizzazz!                                   
                                                                             
 ## What is it?                                                              
                                                                             
 Gold is a Golang library that allows you to use JSON based stylesheets to   
 render Markdown files in the terminal. Just like CSS, you can define color  
 and style attributes on Markdown elements. The difference is that you use   
 ANSI color and terminal codes instead of CSS properties and hex colors.     
                                                                             
 ## Usage                                                                    
                                                                             
 See cmd/gold /cmd/gold/.                                                    
                                                                             
 ## Example Output                                                           
                                                                             
 Image: Gold Dark Style →                                                    
 https://github.com/charmbracelet/gold/raw/master/styles/gallery/dark.png    
                                                                             
 Check out the Gold Style Gallery                                            
 https://github.com/charmbracelet/gold/blob/master/styles/gallery/README.md! 
                                                                             
 ## Colors                                                                   
                                                                             
 Currently  gold  uses the Aurora ANSI colors                                
 https://godoc.org/github.com/logrusorgru/aurora#Index.                      
                                                                             
 ## Development                                                              
                                                                             
 Style definitions located in  styles/  can be embedded into the binary by   
 running statik https://github.com/rakyll/statik:                            
                                                                             
   statik -f -src styles -include "*.json"                                   
                                                                             
 You can re-generate screenshots of all available styles by running          
 gallery.sh . This requires  termshot  and  pngcrush  installed on your      
 system!