typedown 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.9
1
+ 0.0.10
@@ -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")
@@ -19,3 +19,10 @@ More body copy. Standard markdown /italic/ and //bold//.
19
19
  !! Another subheading
20
20
 
21
21
  And body copy again.
22
+
23
+
24
+ "Textile link":http://www.vg.no.
25
+
26
+
27
+ !"Caption":http://www.vg.no/image.jpg
28
+
@@ -12,3 +12,7 @@ More body copy.
12
12
 
13
13
  ('vg/10036000)
14
14
  'amazon/B000JMLFLW
15
+
16
+ "En lenke her":http://www.vg.no
17
+
18
+ Test
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: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 9
10
- version: 0.0.9
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-05 00:00:00 +02:00
18
+ date: 2010-09-12 00:00:00 +02:00
19
19
  default_executable: typedown
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency