Skip to contents

Currently unleash() only adds line breaks after sentences. For better results, you should also add line breaks after long sentence parts, manually.

Usage

unleash(path, new_path = path)

Arguments

path

Path to the Markdown file

new_path

Path where to save the new file

Value

Path to the new file (invisibly)

Examples

markdown_file <- system.file("example.md", package = "aeolus")
readLines(markdown_file)
#>  [1] "This is a **sentence**. This is another [sentence](https://github.com)."                                                           
#>  [2] ""                                                                                                                                  
#>  [3] "In this paragraph"                                                                                                                 
#>  [4] "I made "                                                                                                                           
#>  [5] "random line "                                                                                                                      
#>  [6] "breaks. How annoying"                                                                                                              
#>  [7] "is it?!"                                                                                                                           
#>  [8] ""                                                                                                                                  
#>  [9] "```md"                                                                                                                             
#> [10] "This is a sentence. This is another"                                                                                               
#> [11] "sentence."                                                                                                                         
#> [12] "```"                                                                                                                               
#> [13] ""                                                                                                                                  
#> [14] "This is a very long paragraph very very long without any breaks whatsoever which is sad, because who wants to get such a git diff."
#> [15] ""                                                                                                                                  
#> [16] "1. thing"                                                                                                                          
#> [17] "2. other thing"                                                                                                                    
#> [18] ""                                                                                                                                  
#> [19] "- item 1"                                                                                                                          
#> [20] "- item 2"                                                                                                                          
#> [21] "- item 3"                                                                                                                          
#> [22] ""                                                                                                                                  
#> [23] "**What is wrong with bold text?** What?"                                                                                           
#> [24] ""                                                                                                                                  
#> [25] "The [difference between working openly and transparently](https://wiki.mozilla.org/Working_open#Open_vs._Transparent)."            
#> [26] ""                                                                                                                                  
#> [27] ""                                                                                                                                  
#> [28] "This is a footnote [^ok]."                                                                                                         
#> [29] ""                                                                                                                                  
#> [30] "[^ok]: Some more information."                                                                                                     
unleash(markdown_file)
readLines(markdown_file)
#>  [1] "This is a **sentence**."                                                                                                           
#>  [2] "This is another [sentence](https://github.com)."                                                                                   
#>  [3] ""                                                                                                                                  
#>  [4] "In this paragraph I made random line breaks."                                                                                      
#>  [5] "How annoying is it?!"                                                                                                              
#>  [6] ""                                                                                                                                  
#>  [7] "```md"                                                                                                                             
#>  [8] "This is a sentence. This is another"                                                                                               
#>  [9] "sentence."                                                                                                                         
#> [10] "```"                                                                                                                               
#> [11] ""                                                                                                                                  
#> [12] "This is a very long paragraph very very long without any breaks whatsoever which is sad, because who wants to get such a git diff."
#> [13] ""                                                                                                                                  
#> [14] "1. thing"                                                                                                                          
#> [15] "2. other thing"                                                                                                                    
#> [16] ""                                                                                                                                  
#> [17] "- item 1"                                                                                                                          
#> [18] "- item 2"                                                                                                                          
#> [19] "- item 3"                                                                                                                          
#> [20] ""                                                                                                                                  
#> [21] "**What is wrong with bold text?**"                                                                                                 
#> [22] "What?"                                                                                                                             
#> [23] ""                                                                                                                                  
#> [24] "The [difference between working openly and transparently](https://wiki.mozilla.org/Working_open#Open_vs._Transparent)."            
#> [25] ""                                                                                                                                  
#> [26] "This is a footnote [^ok]."                                                                                                         
#> [27] ""                                                                                                                                  
#> [28] "[^ok]: Some more information."                                                                                                     
#> [29] ""                                                                                                                                  
#> [30] ""