typedown 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +17 -0
- data/VERSION +1 -1
- data/lib/typedown/document.rb +5 -0
- data/test/data/example.tpd +7 -0
- data/test/data/example3.tpd +4 -0
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -70,6 +70,23 @@ A typical typedown document will look like this:
|
|
70
70
|
|
71
71
|
You grin.
|
72
72
|
|
73
|
+
|
74
|
+
!! Link
|
75
|
+
|
76
|
+
The bracket is not very accessible on mobile keyboards.
|
77
|
+
You can create links in textile fashion instead.
|
78
|
+
|
79
|
+
"Textile inspired links":http://example.com/
|
80
|
+
|
81
|
+
|
82
|
+
!! Image
|
83
|
+
|
84
|
+
And you can use the following cross between textile and
|
85
|
+
markdown syntax for images. Typedown will produce an image
|
86
|
+
caption under the image instead of an alt tag.
|
87
|
+
|
88
|
+
!"Image caption":http://example.com/image.jpg
|
89
|
+
|
73
90
|
|
74
91
|
== FEATURES/PROBLEMS:
|
75
92
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/lib/typedown/document.rb
CHANGED
@@ -38,6 +38,11 @@ module Typedown
|
|
38
38
|
text.gsub!(/^! x!\s*/, "**")
|
39
39
|
text.gsub!(/\s*!x-!$/, "**")
|
40
40
|
|
41
|
+
# Textile links to markdown links
|
42
|
+
text.gsub!(/\"(.+)"\:(\S+[\w\d\/])/, "[\\1](\\2)")
|
43
|
+
|
44
|
+
# Typedown image tag
|
45
|
+
text.gsub!(/!\[(.+)\]\((.+)\)/, "<div class='image'><img src='\\2' /><div class='caption'>\\1</div></div>")
|
41
46
|
|
42
47
|
# Insert placeholders around lead in
|
43
48
|
text.gsub!(/^\/\. (( *[^\n].+\n)*)/, "! x!\\1!x-!\n")
|
data/test/data/example.tpd
CHANGED
data/test/data/example3.tpd
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typedown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 10
|
10
|
+
version: 0.0.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- wrimle
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-12 00:00:00 +02:00
|
19
19
|
default_executable: typedown
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|