M
Martin DeMello
Given:
an outline list, with each line indented by a series of tabs
a list of bullets (assume a circular list, for simplicity)
Write a function that replaces every tab with two spaces, except for
the last one, which is replaced by a bullet.
example:
input file:
foo
\t bar
\t \t baz
\t \t \t hello
\t \t world
bullets: %w(* - o x)
output (view in fixed width):
foo
* bar
- baz
o hello
- world
martin
an outline list, with each line indented by a series of tabs
a list of bullets (assume a circular list, for simplicity)
Write a function that replaces every tab with two spaces, except for
the last one, which is replaced by a bullet.
example:
input file:
foo
\t bar
\t \t baz
\t \t \t hello
\t \t world
bullets: %w(* - o x)
output (view in fixed width):
foo
* bar
- baz
o hello
- world
martin