Skip to content

Instantly share code, notes, and snippets.

@nqthqn
Last active October 18, 2018 02:18
Show Gist options
  • Save nqthqn/6cc7c26c9d933d9dfc6c95d45284501a to your computer and use it in GitHub Desktop.
Save nqthqn/6cc7c26c9d933d9dfc6c95d45284501a to your computer and use it in GitHub Desktop.
code step throughs — a format for presenting lines of code in a beautiful way
repo: https://github.com/elm-eug/live-polls
show: /blob/master/src/Poll.elm#L18-L20
emph: L18
emph: L19
show: /blob/master/src/Poll.elm#L29-L43
emph: L29-L32
emph: L41,L43
show: /blob/develop/src/Main.elm#L23-L26
emph: L24
emph: L25
emph: L26
done: Thanks for watching
@nqthqn
Copy link
Author

nqthqn commented Oct 18, 2018

repo specifies what repository you are pulling from, maybe not necessary if you are pulling code examples from multiple places
show specifies what code block is on screen
emph specifies which lines to emphasize
done would be a string that you could put as the last slide

show must come before emph and emph must only emphasize lines in the range from show.

- means "through" and , means "and". So emph: L29-L32 means emphasize lines 29-32. and emph: L41,L43 means emphasize lines 41 and 43.

Maybe the L could be left off, maybe repo and done could be dropped in favor of having a URL at each show block.

Maybe this could work locally if you specify localhost and it serves up some files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment