Skip to content

Instantly share code, notes, and snippets.

@ramnathv
Created February 5, 2013 02:28
Show Gist options
  • Save ramnathv/4711619 to your computer and use it in GitHub Desktop.
Save ramnathv/4711619 to your computer and use it in GitHub Desktop.
New Slide Parser
slide = "#id .class
item: [item1, item2, item3]
new:
- item 1
- item 2
- item 3
---
## Slide Title
*** =block1
## Block 1
"
slide <- str_split(slide, "\n\\*{3}\\s*")[[1]] # slide to blocks
slide <- str_split_fixed(slide, '\n', 2) # blocks to metadata
parse_slide(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment