coursegen 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/coursegen/course/lib/nanoc_filters.rb +14 -4
- data/lib/coursegen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03f1cff6597ed85fbcde71668cb790bb234d1c529d69e8dd5b2590b8fdbb029c
|
4
|
+
data.tar.gz: 17b93ad8dda84b6a73ea6f1f9c7ae01a2e8380ee693bf34b6823bfd2f0416724
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 471215f376cbd6990e4ae3fd1f0929e809c9f933019ca9398719d23bb79344cfd6725625bb4a2f515c88db5a90ea8b4553da16525822b115828cab79c8c78745
|
7
|
+
data.tar.gz: d5d69b84ef364720ac4172e8906bbff350f838b8481c7d49aca9893634460f9698beedfc9005469257e06cc28c12b581deb42d7b88fe58207f4b416ed4ba96e1
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,19 @@
|
|
1
1
|
include VisualHelpers
|
2
2
|
|
3
3
|
Nanoc::Filter.define(:handle_shortcodes) do |content, _params = {}|
|
4
|
+
prefix = /:/
|
4
5
|
content
|
5
|
-
.gsub(/^\$\$
|
6
|
-
.gsub(
|
6
|
+
.gsub(/^\$\$TOPIC_INCLUDE :(\w+)$/) { "<%= include_topic( :#{Regexp.last_match(1)}) %>" }
|
7
|
+
.gsub(/\$\$TOPIC_LINK :(\w+)$/) { "<%= link_to_topic( :#{Regexp.last_match(1)}) %>" }
|
8
|
+
.gsub(/^\$\$SLIDE_TITLE (.+)$/) { "<slide_break></slide_break>\n\n### #{Regexp.last_match(1)}" }
|
7
9
|
.gsub(/^\$\$SLIDE_BREAK$/) { "<slide_break></slide_break>" }
|
8
|
-
.gsub(/^\$\$
|
9
|
-
|
10
|
+
.gsub(/^\$\$LECTURE_END$/) { end_of_lecture }
|
11
|
+
.gsub(/^\$\$LECTURE_BEGIN (.+)$/) { "## #{Regexp.last_match(1)} "}
|
12
|
+
.gsub(Regexp.new(prefix.source + /h1 (.+)$/.source), "# \\1 ")
|
13
|
+
.gsub(Regexp.new(prefix.source + /h2 (.+)$/.source), "## \\1 ")
|
14
|
+
.gsub(Regexp.new(prefix.source + /h3 (.+)$/.source), "### \\1 ")
|
15
|
+
.gsub(Regexp.new(prefix.source + /topic_include :(\w+)$/.source), "<%= include_topic( :\\1) %>")
|
16
|
+
.gsub(Regexp.new(prefix.source + /topic_link :(\w+)$/.source), "<%= link_to_topic( :\\1) %>")
|
17
|
+
.gsub(Regexp.new(prefix.source + /slide_title (.+)$/.source), "<slide_break></slide_break>\n\n### \\1")
|
18
|
+
.gsub(Regexp.new(prefix.source + /lecture_end/.source), end_of_lecture)
|
19
|
+
end
|
data/lib/coursegen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coursegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pito Salas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|