markdownizer 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -10,6 +10,14 @@ In your Gemfile:
10
10
 
11
11
  gem 'markdownizer'
12
12
 
13
+ If you want code highlighting, you should run this generator too:
14
+
15
+ rails generate markdownizer:install
16
+
17
+ This will place a markdownizer.css file in your `public/stylesheets` folder.
18
+ You will have to require it manually in your layouts, or through `jammit`, or
19
+ whatever.
20
+
13
21
  ## Usage
14
22
 
15
23
  In your model, let's say, Post:
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'markdownizer'
@@ -0,0 +1,15 @@
1
+ require 'rails/generators'
2
+
3
+ module Markdownizer
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ desc "Copy Markdownizer code highlighting stylesheets"
7
+
8
+ source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
9
+
10
+ def copy_stylesheet_file
11
+ copy_file 'coderay.css', 'public/stylesheets/markdownizer.css'
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,131 @@
1
+ .CodeRay {
2
+ background-color: #f8f8f8;
3
+ border: 1px solid silver;
4
+ font-family: 'Courier New', 'Terminal', monospace;
5
+ color: #000;
6
+ }
7
+ .CodeRay pre { margin: 0px }
8
+
9
+ div.CodeRay { }
10
+
11
+ span.CodeRay { white-space: pre; border: 0px; padding: 2px }
12
+
13
+ table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
14
+ table.CodeRay td { padding: 2px 4px; vertical-align: top }
15
+
16
+ .CodeRay .line_numbers, .CodeRay .no {
17
+ background-color: #def;
18
+ color: gray;
19
+ text-align: right;
20
+ }
21
+ .CodeRay .line_numbers tt { font-weight: bold }
22
+ .CodeRay .line_numbers .highlighted { color: red }
23
+ .CodeRay .line { display: block; float: left; width: 100%; }
24
+ .CodeRay .no { padding: 0px 4px }
25
+ .CodeRay .code { width: 100% }
26
+
27
+ ol.CodeRay { font-size: 10pt }
28
+ ol.CodeRay li { white-space: pre }
29
+
30
+ .CodeRay .code pre { overflow: auto }
31
+
32
+ .CodeRay .debug { color:white ! important; background:blue ! important; }
33
+
34
+ .CodeRay .af { color:#00C }
35
+ .CodeRay .an { color:#007 }
36
+ .CodeRay .at { color:#f08 }
37
+ .CodeRay .av { color:#700 }
38
+ .CodeRay .aw { color:#C00 }
39
+ .CodeRay .bi { color:#509; font-weight:bold }
40
+ .CodeRay .c { color:#888; }
41
+
42
+ .CodeRay .ch { color:#04D }
43
+ .CodeRay .ch .k { color:#04D }
44
+ .CodeRay .ch .dl { color:#039 }
45
+
46
+ .CodeRay .cl { color:#B06; font-weight:bold }
47
+ .CodeRay .cm { color:#A08; font-weight:bold }
48
+ .CodeRay .co { color:#036; font-weight:bold }
49
+ .CodeRay .cr { color:#0A0 }
50
+ .CodeRay .cv { color:#369 }
51
+ .CodeRay .de { color:#B0B; }
52
+ .CodeRay .df { color:#099; font-weight:bold }
53
+ .CodeRay .di { color:#088; font-weight:bold }
54
+ .CodeRay .dl { color:black }
55
+ .CodeRay .do { color:#970 }
56
+ .CodeRay .dt { color:#34b }
57
+ .CodeRay .ds { color:#D42; font-weight:bold }
58
+ .CodeRay .e { color:#666; font-weight:bold }
59
+ .CodeRay .en { color:#800; font-weight:bold }
60
+ .CodeRay .er { color:#F00; background-color:#FAA }
61
+ .CodeRay .ex { color:#C00; font-weight:bold }
62
+ .CodeRay .fl { color:#60E; font-weight:bold }
63
+ .CodeRay .fu { color:#06B; font-weight:bold }
64
+ .CodeRay .gv { color:#d70; font-weight:bold }
65
+ .CodeRay .hx { color:#058; font-weight:bold }
66
+ .CodeRay .i { color:#00D; font-weight:bold }
67
+ .CodeRay .ic { color:#B44; font-weight:bold }
68
+
69
+ .CodeRay .il { background: #ddd; color: black }
70
+ .CodeRay .il .il { background: #ccc }
71
+ .CodeRay .il .il .il { background: #bbb }
72
+ .CodeRay .il .idl { background: #ddd; font-weight: bold; color: #666 }
73
+ .CodeRay .idl { background-color: #bbb; font-weight: bold; color: #666; }
74
+
75
+ .CodeRay .im { color:#f00; }
76
+ .CodeRay .in { color:#B2B; font-weight:bold }
77
+ .CodeRay .iv { color:#33B }
78
+ .CodeRay .la { color:#970; font-weight:bold }
79
+ .CodeRay .lv { color:#963 }
80
+ .CodeRay .oc { color:#40E; font-weight:bold }
81
+ .CodeRay .of { color:#000; font-weight:bold }
82
+ .CodeRay .op { }
83
+ .CodeRay .pc { color:#038; font-weight:bold }
84
+ .CodeRay .pd { color:#369; font-weight:bold }
85
+ .CodeRay .pp { color:#579; }
86
+ .CodeRay .ps { color:#00C; font-weight:bold }
87
+ .CodeRay .pt { color:#074; font-weight:bold }
88
+ .CodeRay .r, .kw { color:#080; font-weight:bold }
89
+
90
+ .CodeRay .ke { color: #808; }
91
+ .CodeRay .ke .dl { color: #606; }
92
+ .CodeRay .ke .ch { color: #80f; }
93
+ .CodeRay .vl { color: #088; }
94
+
95
+ .CodeRay .rx { background-color:#fff0ff }
96
+ .CodeRay .rx .k { color:#808 }
97
+ .CodeRay .rx .dl { color:#404 }
98
+ .CodeRay .rx .mod { color:#C2C }
99
+ .CodeRay .rx .fu { color:#404; font-weight: bold }
100
+
101
+ .CodeRay .s { background-color:#fff0f0; color: #D20; }
102
+ .CodeRay .s .s { background-color:#ffe0e0 }
103
+ .CodeRay .s .s .s { background-color:#ffd0d0 }
104
+ .CodeRay .s .k { }
105
+ .CodeRay .s .ch { color: #b0b; }
106
+ .CodeRay .s .dl { color: #710; }
107
+
108
+ .CodeRay .sh { background-color:#f0fff0; color:#2B2 }
109
+ .CodeRay .sh .k { }
110
+ .CodeRay .sh .dl { color:#161 }
111
+
112
+ .CodeRay .sy { color:#A60 }
113
+ .CodeRay .sy .k { color:#A60 }
114
+ .CodeRay .sy .dl { color:#630 }
115
+
116
+ .CodeRay .ta { color:#070 }
117
+ .CodeRay .tf { color:#070; font-weight:bold }
118
+ .CodeRay .ts { color:#D70; font-weight:bold }
119
+ .CodeRay .ty { color:#339; font-weight:bold }
120
+ .CodeRay .v { color:#036 }
121
+ .CodeRay .xt { color:#444 }
122
+
123
+ .CodeRay .ins { background: #afa; }
124
+ .CodeRay .del { background: #faa; }
125
+ .CodeRay .chg { color: #aaf; background: #007; }
126
+ .CodeRay .head { color: #f8f; background: #505 }
127
+
128
+ .CodeRay .ins .ins { color: #080; font-weight:bold }
129
+ .CodeRay .del .del { color: #800; font-weight:bold }
130
+ .CodeRay .chg .chg { color: #66f; }
131
+ .CodeRay .head .head { color: #f4f; }
@@ -1,3 +1,3 @@
1
1
  module Markdownizer
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 0
8
7
  - 1
9
- version: 0.0.1
8
+ - 0
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Josep M. Bach
@@ -92,6 +92,9 @@ files:
92
92
  - Gemfile.lock
93
93
  - Rakefile
94
94
  - Readme.md
95
+ - init.rb
96
+ - lib/generators/markdownizer/install_generator.rb
97
+ - lib/generators/markdownizer/templates/coderay.css
95
98
  - lib/markdownizer.rb
96
99
  - lib/markdownizer/version.rb
97
100
  - markdownizer.gemspec