https://github.com/cloudhead/prose
lightweight text to html parser, combining the best of Markdown with a hint of Textile
https://github.com/cloudhead/prose
Last synced: 9 months ago
JSON representation
lightweight text to html parser, combining the best of Markdown with a hint of Textile
- Host: GitHub
- URL: https://github.com/cloudhead/prose
- Owner: cloudhead
- Created: 2009-02-05T13:38:37.000Z (about 17 years ago)
- Default Branch: master
- Last Pushed: 2009-05-19T17:10:13.000Z (almost 17 years ago)
- Last Synced: 2025-04-30T05:33:57.916Z (11 months ago)
- Language: Ruby
- Homepage:
- Size: 85.9 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Prose
=====
lightweight text to html/json parser
Usage:
-----
Prose.new(text).parse
or
Prose.parse text
lite mode (no headers, escape html):
text = Prose.new(text).parse(true)
You will also find a command line tool in /bin
Parser:
------
Document Title
==============
Header
------
# Sub-Header
## Sub-sub-Header
..etc..
- Milk 1. Milk
- Apples 2. Apples
- Coffee 3. Coffee
<< Blockquote >>
"Click Here":http://www.github.com
Click:http://www.google.com
+-+-+-+
, must have empty line before and after
+=+=+
---
*milk* milk
_milk_ milk
%mlik% milk
-milk- milk
"milk" milk
hot--milk &mdash
hot - milk &ndash
(C),(R) ©, ®
2 x 2 / 5 ×, ÷
... Ellipsis
// Secret Comment, won't show up in html
/* Secret */
Metadata:
--------
When parsing to json, you might want to include additional metadata
into the document. It's as simple as:
@author: Cloudhead
@version: 1.0
@category: "misc"
..etc..
Quotes ("") are optional