https://github.com/kikito/loincloth
Like redcloth or bluecloth, but worse
https://github.com/kikito/loincloth
Last synced: 5 months ago
JSON representation
Like redcloth or bluecloth, but worse
- Host: GitHub
- URL: https://github.com/kikito/loincloth
- Owner: kikito
- License: mit
- Created: 2011-05-24T23:10:00.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-06-09T22:05:15.000Z (over 14 years ago)
- Last Synced: 2025-03-02T21:16:04.333Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE.txt
Awesome Lists containing this project
README
loincloth
=========This gem parses a subset of MarkDown, in an inefficient way, both in terms of speed and memory. I call that subset PoloDown.
If you are thinking using this on a production environment ... well, I admire you. But I really think you should give the proper-MarkDown-parsing gems (Maruku, BlueCloth, etc) a look first.
Also, going to the doctor would not hurt.
Target
------The target is being able to convert headers (level 1 and 2 only), paragraphs, lists (unordered, one level), emphasized text & strong text (stars only), links and images (inline only).
``` markdown
A First Level Header
====================A Second Level Header
---------------------Now is the time for all *good* men to come to
the aid of **their** country. This is just a
regular paragraph.* Get socks
* Get milk
* [Get firefox](http://getfirefox.com)
```
Should produce:
``` html
A First Level Header
A Second Level Header
Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.
- Get socks
- Get milk
- Get firefox
```
Other notes:
* I'll be using UTF-8 on my tests. I can't guarantee it will handle other encodings properly.
* Line separators *must be* '\n'. Other line separators (specially if you use '\r' only) might give give you nasty surprises.
Tests
-----
This gem uses my testing gem, [assertor](https://rubygems.org/gems/assertor), for tests.
Consider that a business requirement. Sorry.
Contributing to loincloth
-------------------------
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright
---------
Copyright (c) 2011 Enrique García Cota. See LICENSE.txt for
further details.