Skip to content
Snippets Groups Projects
Commit 32524651 authored by Holger Brandl's avatar Holger Brandl
Browse files

improved indenting

parent de61c27b
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,8 @@ mdRegex <- "^#([#]*)> ([^{]*)([{]+(.+)[}])?"
#str_match("##> test heading {fig.width=10}", mdRegex)
#str_match("#> simple markup", mdRegex)
#str_match("#> {fig.width=10}", mdRegex)
str_match("#> nematic has no direction as a vector has", mdRegex)
#str_match("#> * normBxx >0 --> horizontal", mdRegex)
#readLines(file("/Users/brandl/Dropbox/Public/datautils/R/rknit/rknit_example.R")) %>%
readLines(file("stdin")) %>%
str_replace(mdRegex, "```\n\\1 \\2\n```{r \\4}") %>% str_trim() %>% paste(collapse="\n") %>% cat()
str_replace(mdRegex, "```\n\\1\\2\n```{r \\4}") %>% paste(collapse="\n") %>% cat()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment