vimdeck 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ VERSION = File.read(File.join(".", "VERSION"))
5
5
 
6
6
  desc "Build gem from gemspec"
7
7
  task :build do
8
+ system "rm *.gem"
8
9
  system "gem build vimdeck.gemspec"
9
10
  end
10
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
data/bin/vimdeck CHANGED
@@ -34,6 +34,10 @@ opt_parser = OptionParser.new do |opt|
34
34
  opt.on("-A", "--no-ascii") do
35
35
  options[:no_ascii] = true
36
36
  end
37
+
38
+ opt.on("-I", "--no-indent") do
39
+ options[:no_indent] = true
40
+ end
37
41
  end
38
42
 
39
43
  opt_parser.parse!
data/lib/vimdeck.rb CHANGED
@@ -36,9 +36,9 @@ module Vimdeck
36
36
  :block_html, :list_item,
37
37
 
38
38
  # span-level calls
39
- :autolink, :codespan, :double_emphasis,
40
- :emphasis, :underline, :raw_html,
41
- :triple_emphasis, :strikethrough,
39
+ :autolink,
40
+ :underline, :raw_html,
41
+ :strikethrough,
42
42
  :superscript,
43
43
 
44
44
  # footnotes
@@ -52,6 +52,22 @@ module Vimdeck
52
52
  end
53
53
  end
54
54
 
55
+ def code_span(text)
56
+ return "`#{text}`"
57
+ end
58
+
59
+ def emphasis(text)
60
+ return "*#{text}*"
61
+ end
62
+
63
+ def double_emphasis(text)
64
+ return "**#{text}**"
65
+ end
66
+
67
+ def triple_emphasis(text)
68
+ return "***#{text}***"
69
+ end
70
+
55
71
  def list(content, type)
56
72
  if type == :unordered
57
73
  "<!~#{content}~!>"
@@ -64,10 +80,19 @@ module Vimdeck
64
80
  if !Vimdeck::Slideshow.options[:no_ascii]
65
81
  case level
66
82
  when 1
67
- Vimdeck::Ascii.header(title, "large") + "\n"
68
-
83
+ heading = Vimdeck::Ascii.header(title, "large")
84
+ if Vimdeck::Slideshow.options[:no_indent]
85
+ heading = " " + heading.gsub( /\n/, "\n " ) + "\n"
86
+ else
87
+ heading + "\n"
88
+ end
69
89
  when 2
70
- Vimdeck::Ascii.header(title, "small") + "\n"
90
+ heading = Vimdeck::Ascii.header(title, "small")
91
+ if Vimdeck::Slideshow.options[:no_indent]
92
+ heading = " " + heading.gsub( /\n/, "\n " ) + "\n"
93
+ else
94
+ heading + "\n"
95
+ end
71
96
  end
72
97
  else
73
98
  title + "\n\n"
@@ -99,7 +124,7 @@ module Vimdeck
99
124
  end
100
125
 
101
126
  def self.slide_padding
102
- " "
127
+ @options[:no_indent] ? "" : " "
103
128
  end
104
129
 
105
130
  def self.script_template
@@ -26,7 +26,7 @@ b 4
26
26
  b 5
27
27
 
28
28
 
29
- call matchadd("Comment", "\\n • Second\\n • Third\\(\\_.*slide 5\\)\\@=")
29
+ call matchadd("Comment", "\\n• Second\\n• Third\\(\\_.*slide 5\\)\\@=")
30
30
 
31
31
 
32
32
  b 6
@@ -34,79 +34,79 @@ b 6
34
34
 
35
35
  call matchadd("Comment", "• First\\(\\_.*slide 6\\)\\@=")
36
36
 
37
- call matchadd("Comment", "\\n • Third\\(\\_.*slide 6\\)\\@=")
37
+ call matchadd("Comment", "\\n• Third\\(\\_.*slide 6\\)\\@=")
38
38
 
39
39
 
40
40
  b 7
41
41
 
42
42
 
43
- call matchadd("Comment", "• First\\n • Second\\(\\_.*slide 7\\)\\@=")
43
+ call matchadd("Comment", "• First\\n• Second\\(\\_.*slide 7\\)\\@=")
44
44
 
45
45
 
46
46
  b 8
47
47
 
48
- 3,14SyntaxInclude ruby
48
+ 6,17SyntaxInclude ruby
49
49
 
50
50
 
51
51
 
52
52
  b 9
53
53
 
54
- 3,14SyntaxInclude ruby
54
+ 6,17SyntaxInclude ruby
55
55
 
56
56
 
57
- call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \\(\\_.*slide 9\\)\\@=")
57
+ call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \\(\\_.*slide 9\\)\\@=")
58
58
 
59
- call matchadd("Comment", "\\n end\\n end\\n end\\(\\_.*slide 9\\)\\@=")
59
+ call matchadd("Comment", "\\n end\\n end\\nend\\(\\_.*slide 9\\)\\@=")
60
60
 
61
61
 
62
62
  b 10
63
63
 
64
- 3,14SyntaxInclude ruby
64
+ 6,17SyntaxInclude ruby
65
65
 
66
66
 
67
- call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def\\(\\_.*slide 10\\)\\@=")
67
+ call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def\\(\\_.*slide 10\\)\\@=")
68
68
 
69
- call matchadd("Comment", "highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 10\\)\\@=")
69
+ call matchadd("Comment", "highlight = \"vimdeck\"\\n end\\n end\\nend\\(\\_.*slide 10\\)\\@=")
70
70
 
71
71
 
72
72
  b 11
73
73
 
74
- 3,14SyntaxInclude ruby
74
+ 6,17SyntaxInclude ruby
75
75
 
76
76
 
77
- call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\(\\_.*slide 11\\)\\@=")
77
+ call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\(\\_.*slide 11\\)\\@=")
78
78
 
79
- call matchadd("Comment", "= \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 11\\)\\@=")
79
+ call matchadd("Comment", "= \"vimdeck\"\\n end\\n end\\nend\\(\\_.*slide 11\\)\\@=")
80
80
 
81
81
 
82
82
  b 12
83
83
 
84
- 3,14SyntaxInclude ruby
84
+ 6,17SyntaxInclude ruby
85
85
 
86
86
 
87
87
  call matchadd("Comment", "module\\(\\_.*slide 12\\)\\@=")
88
88
 
89
- call matchadd("Comment", "class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 12\\)\\@=")
89
+ call matchadd("Comment", "class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\nend\\(\\_.*slide 12\\)\\@=")
90
90
 
91
91
 
92
92
  b 13
93
93
 
94
- 3,14SyntaxInclude ruby
94
+ 6,17SyntaxInclude ruby
95
95
 
96
96
 
97
- call matchadd("Comment", "module Parts\\n class foo\\n def slide\\(\\_.*slide 13\\)\\@=")
97
+ call matchadd("Comment", "module Parts\\n class foo\\n def slide\\(\\_.*slide 13\\)\\@=")
98
98
 
99
- call matchadd("Comment", "end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 13\\)\\@=")
99
+ call matchadd("Comment", "end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\nend\\(\\_.*slide 13\\)\\@=")
100
100
 
101
101
 
102
102
  b 14
103
103
 
104
- 3,14SyntaxInclude ruby
104
+ 6,17SyntaxInclude ruby
105
105
 
106
106
 
107
- call matchadd("Comment", "module Parts\\n class foo\\n def\\(\\_.*slide 14\\)\\@=")
107
+ call matchadd("Comment", "module Parts\\n class foo\\n def\\(\\_.*slide 14\\)\\@=")
108
108
 
109
- call matchadd("Comment", "\"of a\"\\n end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 14\\)\\@=")
109
+ call matchadd("Comment", "\"of a\"\\n end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\nend\\(\\_.*slide 14\\)\\@=")
110
110
 
111
111
 
112
112
  b 15
@@ -1,6 +1,13 @@
1
- VIMDECK
2
-
3
- PURE AWESOME
1
+ _ ________ _______ ______________ __
2
+ | | / / _/ |/ / __ \/ ____/ ____/ //_/
3
+ | | / // // /|_/ / / / / __/ / / / ,<
4
+ | |/ // // / / / /_/ / /___/ /___/ /| |
5
+ |___/___/_/ /_/_____/_____/\____/_/ |_|
6
+
7
+ ___ __ _____ ____ ___ _ ______________ __ _______
8
+ / _ \/ / / / _ \/ __/ / _ | | /| / / __/ __/ __ \/ |/ / __/
9
+ / ___/ /_/ / , _/ _/ / __ | |/ |/ / _/_\ \/ /_/ / /|_/ / _/
10
+ /_/ \____/_/|_/___/ /_/ |_|__/|__/___/___/\____/_/ /_/___/
4
11
 
5
12
 
6
13
 
@@ -1,22 +1,26 @@
1
- VIM ROCKS!
2
-
3
- +------------------------------+
4
- | :.. |
5
- | ~===..=+.++==:.+==+======. |
6
- | ~oooooooo==~:..+=oooooooo~ |
7
- | .+oo=oo=::....:=oooooo+.. |
8
- | .=ooooo=.::::+ooooo=++. |
9
- | .=ooooo=:+:+ooooo=+:~+. |
10
- | ..:.=ooo=o==+ooooo=+:.::.... |
11
- |.+::.=oooooooooooo+::.........|
12
- | ..:ooooooooo====:.......:. |
13
- | .ooooooooo+++:......... |
14
- | .=ooooo==~~==.+=++==+=+. |
15
- | .=ooo==~:.++.:=+.==+.==. |
16
- | .=oo=:..:+=:=o=.:=+~=+. |
17
- | .~~. ..::~:. ~..~..~ |
18
- | .~ |
19
- +------------------------------+
1
+ _ ________ ___ ____ ____ ________ _______ __
2
+ | | / / _/ |/ / / __ \/ __ \/ ____/ //_/ ___// /
3
+ | | / // // /|_/ / / /_/ / / / / / / ,< \__ \/ /
4
+ | |/ // // / / / / _, _/ /_/ / /___/ /| |___/ /_/
5
+ |___/___/_/ /_/ /_/ |_|\____/\____/_/ |_/____(_)
6
+
7
+ +------------------------------+
8
+ | :.. |
9
+ | ~===..=+.++==:.+==+======. |
10
+ | ~oooooooo==~:..+=oooooooo~ |
11
+ | .+oo=oo=::....:=oooooo+.. |
12
+ | .=ooooo=.::::+ooooo=++. |
13
+ | .=ooooo=:+:+ooooo=+:~+. |
14
+ | ..:.=ooo=o==+ooooo=+:.::.... |
15
+ |.+::.=oooooooooooo+::.........|
16
+ | ..:ooooooooo====:.......:. |
17
+ | .ooooooooo+++:......... |
18
+ | .=ooooo==~~==.+=++==+=+. |
19
+ | .=ooo==~:.++.:=+.==+.==. |
20
+ | .=oo=:..:+=:=o=.:=+~=+. |
21
+ | .~~. ..::~:. ~..~..~ |
22
+ | .~ |
23
+ +------------------------------+
20
24
 
21
25
 
22
26
 
@@ -1,8 +1,11 @@
1
- PARAGRAPHS
1
+ ___ ___ ___ ___ ________ ___ ___ __ ______
2
+ / _ \/ _ | / _ \/ _ |/ ___/ _ \/ _ | / _ \/ // / __/
3
+ / ___/ __ |/ , _/ __ / (_ / , _/ __ |/ ___/ _ /\ \
4
+ /_/ /_/ |_/_/|_/_/ |_\___/_/|_/_/ |_/_/ /_//_/___/
2
5
 
3
- This is a paragraph (plain text)
6
+ This is a `paragraph` (plain text)
4
7
 
5
- This is another paragraph
8
+ This is another paragraph
6
9
 
7
10
 
8
11
 
@@ -1,8 +1,11 @@
1
- NUMBERED LIST
2
-
3
- 1. This is how a numbered list
4
- 2. Looks in vimdeck
5
- 3. What do you think?
1
+ _ ____ ____ ______ _______ _______ __ ______________
2
+ / |/ / / / / |/ / _ )/ __/ _ \/ __/ _ \ / / / _/ __/_ __/
3
+ / / /_/ / /|_/ / _ / _// , _/ _// // / / /___/ /_\ \ / /
4
+ /_/|_/\____/_/ /_/____/___/_/|_/___/____/ /____/___/___/ /_/
5
+
6
+ 1. This *is* how a *numbered* list
7
+ 2. Looks in **vimdeck**
8
+ 3. What do ***you*** think?
6
9
 
7
10
 
8
11
 
@@ -1,8 +1,12 @@
1
- BULLETS
2
-
3
- First
4
- Second
5
- Third
1
+ ____ __ ____ __ _________________
2
+ / __ )/ / / / / / / / ____/_ __/ ___/
3
+ / __ / / / / / / / / __/ / / \__ \
4
+ / /_/ / /_/ / /___/ /___/ /___ / / ___/ /
5
+ /_____/\____/_____/_____/_____/ /_/ /____/
6
+
7
+ • First
8
+ • Second
9
+ • Third
6
10
 
7
11
 
8
12
 
@@ -1,8 +1,12 @@
1
- BULLETS
2
-
3
- First
4
- Second
5
- Third
1
+ ____ __ ____ __ _________________
2
+ / __ )/ / / / / / / / ____/_ __/ ___/
3
+ / __ / / / / / / / / __/ / / \__ \
4
+ / /_/ / /_/ / /___/ /___/ /___ / / ___/ /
5
+ /_____/\____/_____/_____/_____/ /_/ /____/
6
+
7
+ • First
8
+ • Second
9
+ • Third
6
10
 
7
11
 
8
12
 
@@ -1,8 +1,12 @@
1
- BULLETS
2
-
3
- First
4
- Second
5
- Third
1
+ ____ __ ____ __ _________________
2
+ / __ )/ / / / / / / / ____/_ __/ ___/
3
+ / __ / / / / / / / / __/ / / \__ \
4
+ / /_/ / /_/ / /___/ /___/ /___ / / ___/ /
5
+ /_____/\____/_____/_____/_____/ /_/ /____/
6
+
7
+ • First
8
+ • Second
9
+ • Third
6
10
 
7
11
 
8
12
 
@@ -1,16 +1,19 @@
1
- CODE
2
-
3
- module Parts
4
- class foo
5
- def slide
6
- "of a"
7
- end
8
-
9
- def can
10
- highlight = "vimdeck"
11
- end
12
- end
13
- end
1
+ _________ ___ ____
2
+ / ___/ __ \/ _ \/ __/
3
+ / /__/ /_/ / // / _/
4
+ \___/\____/____/___/
5
+
6
+ module Parts
7
+ class foo
8
+ def slide
9
+ "of a"
10
+ end
11
+
12
+ def can
13
+ highlight = "vimdeck"
14
+ end
15
+ end
16
+ end
14
17
 
15
18
 
16
19
 
@@ -1,16 +1,19 @@
1
- CODE
2
-
3
- module Parts
4
- class foo
5
- def slide
6
- "of a"
7
- end
8
-
9
- def can
10
- highlight = "vimdeck"
11
- end
12
- end
13
- end
1
+ _________ ___ ____
2
+ / ___/ __ \/ _ \/ __/
3
+ / /__/ /_/ / // / _/
4
+ \___/\____/____/___/
5
+
6
+ module Parts
7
+ class foo
8
+ def slide
9
+ "of a"
10
+ end
11
+
12
+ def can
13
+ highlight = "vimdeck"
14
+ end
15
+ end
16
+ end
14
17
 
15
18
 
16
19
 
@@ -1,16 +1,19 @@
1
- CODE
2
-
3
- module Parts
4
- class foo
5
- def slide
6
- "of a"
7
- end
8
-
9
- def can
10
- highlight = "vimdeck"
11
- end
12
- end
13
- end
1
+ _________ ___ ____
2
+ / ___/ __ \/ _ \/ __/
3
+ / /__/ /_/ / // / _/
4
+ \___/\____/____/___/
5
+
6
+ module Parts
7
+ class foo
8
+ def slide
9
+ "of a"
10
+ end
11
+
12
+ def can
13
+ highlight = "vimdeck"
14
+ end
15
+ end
16
+ end
14
17
 
15
18
 
16
19
 
@@ -1,16 +1,19 @@
1
- CODE
2
-
3
- module Parts
4
- class foo
5
- def slide
6
- "of a"
7
- end
8
-
9
- def can
10
- highlight = "vimdeck"
11
- end
12
- end
13
- end
1
+ _________ ___ ____
2
+ / ___/ __ \/ _ \/ __/
3
+ / /__/ /_/ / // / _/
4
+ \___/\____/____/___/
5
+
6
+ module Parts
7
+ class foo
8
+ def slide
9
+ "of a"
10
+ end
11
+
12
+ def can
13
+ highlight = "vimdeck"
14
+ end
15
+ end
16
+ end
14
17
 
15
18
 
16
19
 
@@ -1,16 +1,19 @@
1
- CODE
2
-
3
- module Parts
4
- class foo
5
- def slide
6
- "of a"
7
- end
8
-
9
- def can
10
- highlight = "vimdeck"
11
- end
12
- end
13
- end
1
+ _________ ___ ____
2
+ / ___/ __ \/ _ \/ __/
3
+ / /__/ /_/ / // / _/
4
+ \___/\____/____/___/
5
+
6
+ module Parts
7
+ class foo
8
+ def slide
9
+ "of a"
10
+ end
11
+
12
+ def can
13
+ highlight = "vimdeck"
14
+ end
15
+ end
16
+ end
14
17
 
15
18
 
16
19
 
@@ -1,16 +1,19 @@
1
- CODE
2
-
3
- module Parts
4
- class foo
5
- def slide
6
- "of a"
7
- end
8
-
9
- def can
10
- highlight = "vimdeck"
11
- end
12
- end
13
- end
1
+ _________ ___ ____
2
+ / ___/ __ \/ _ \/ __/
3
+ / /__/ /_/ / // / _/
4
+ \___/\____/____/___/
5
+
6
+ module Parts
7
+ class foo
8
+ def slide
9
+ "of a"
10
+ end
11
+
12
+ def can
13
+ highlight = "vimdeck"
14
+ end
15
+ end
16
+ end
14
17
 
15
18
 
16
19
 
@@ -1,16 +1,19 @@
1
- CODE
2
-
3
- module Parts
4
- class foo
5
- def slide
6
- "of a"
7
- end
8
-
9
- def can
10
- highlight = "vimdeck"
11
- end
12
- end
13
- end
1
+ _________ ___ ____
2
+ / ___/ __ \/ _ \/ __/
3
+ / /__/ /_/ / // / _/
4
+ \___/\____/____/___/
5
+
6
+ module Parts
7
+ class foo
8
+ def slide
9
+ "of a"
10
+ end
11
+
12
+ def can
13
+ highlight = "vimdeck"
14
+ end
15
+ end
16
+ end
14
17
 
15
18
 
16
19
 
@@ -1,4 +1,8 @@
1
- The End!
1
+ ________ ______ ____
2
+ /_ __/ /_ ___ / ____/___ ____/ / /
3
+ / / / __ \/ _ \ / __/ / __ \/ __ / /
4
+ / / / / / / __/ / /___/ / / / /_/ /_/
5
+ /_/ /_/ /_/\___/ /_____/_/ /_/\__,_(_)
2
6
 
3
7
 
4
8
 
data/slides.md CHANGED
@@ -10,16 +10,16 @@
10
10
 
11
11
  ## PARAGRAPHS
12
12
 
13
- This is a paragraph (plain text)
13
+ This is a `paragraph` (plain text)
14
14
 
15
15
  This is another paragraph
16
16
 
17
17
 
18
18
  ## NUMBERED LIST
19
19
 
20
- 1. This is how a numbered list
21
- 2. Looks in vimdeck
22
- 3. What do you think?
20
+ 1. This _is_ how a *numbered* list
21
+ 2. Looks in **vimdeck**
22
+ 3. What do ***you*** think?
23
23
 
24
24
 
25
25
  # BULLETS
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vimdeck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: