calico 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +21 -1
  2. data/lib/calico.rb +1 -0
  3. metadata +1 -1
data/README.md CHANGED
@@ -1,3 +1,23 @@
1
- _* Calico *_
1
+ Calico
2
+ ======
2
3
 
4
+ Calico is a lightweight markup language designed to be used in web apps to
5
+ format user-submitted content.\\
6
+ It mainly uses Markdown's syntax when appropriated to make things painless.
3
7
 
8
+ It is greatly inspired by [Challis](http://github.com/chneukirchen/challis) from
9
+ Christian Neukirchen, but is even more lightweight.
10
+
11
+ ## Features
12
+
13
+ Calico handles four block elements: paragraphs, (unordered) lists, quotes and
14
+ raw unprocessed text blocks.
15
+
16
+ In the first three block types, you can use inline markup along the lines of
17
+ Markdown. Raw blocks are left untouched (except HTML-entity escaping)
18
+
19
+ ## Tutorial
20
+
21
+ Blocks are separated by two newlines. Raw blocks are enclosed by a pair of `---`
22
+ on their own lines. The first characters of a block gives it's type: `*␣` for a
23
+ list, `>␣` for a quote, anything else for a paragraph.
data/lib/calico.rb CHANGED
@@ -6,6 +6,7 @@ class Calico < String
6
6
 
7
7
  def parse
8
8
  strip!
9
+ delete!("\r")
9
10
  split(/\n*^(---.*?^---)\n*|(?:\n\n+)/m).map do |block|
10
11
  case block
11
12
  when /\A\*\s/
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: calico
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Fran\xC3\xA7ois Vaux"