Open-source implementation of Markdown for C# and Javascript
JavaScript C# HTML CSS Other
Switch branches/tags
Nothing to show
Pull request Compare This branch is 31 commits ahead, 24 commits behind toptensoftware:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
MarkdownDeep
MarkdownDeepBenchmark
MarkdownDeepGui
MarkdownDeepJS
MarkdownDeepSample
MarkdownDeepTests
MarkdownDevBed
Output
Tools
packages
.gitignore
MarkdownDeep.sln
README.md
UpgradeLog.XML
UpgradeLog.htm
UpgradeLog2.XML
UpgradeLog2.htm

README.md

markdowndeep

Open-source implementation of Markdown for C# and Javascript

This fork of original [topsoftware/markdowndeep] project implements some new Table feature:

  • multiple header rows: any row before separator-row will be added in thead tag of table.
  • colspan: you can define how many columns will be occuped by cell.
  • Header style: if content starts with # the tagname of cell will be th instead of td.
  • cell alignment: you can customize alignment cell by cell.

This fork solves some minor issue in table:

  • cell count wrong in tables with bad formatting

Multiple header rows

Any row inserted before the "separator row" will be added in thead tag of table.

markdown text
| Your name  | Your name |   Home  | Home  | Office  | Office |   Office    |
| First name | Last name | address | city  | address | city   | Email       |
|:-----------|:----------|:--------|:-----:|:--------|:------:|:------------|
| Mark       | Deep      | ss...   | NY    | ss....  | WH     | aa@acme.com |
| James      | White     | ss...   | NY    | ss..    | CA     | bb@acme.com |
| ...        | ...       | ...     | ...   | ...     | ...    | ...         |
| ...        | ...       | ...     | ...   | ...     | ...    | ...         |
| ...        | ...       | ...     | ...   | ...     | ...    | ...         |
| ...        | ...       | ...     | ...   | ...     | ...    | ...         |
Preview
Your name Your name Home Home Office Office Office
First name Last name address city address city Email
Mark Deep ss... NY ss.... WH aa@acme.com
James White ss... NY ss.. CA bb@acme.com
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...

colspan

Like MultiMarkdown, fspezi/markdowndeep implements table colspan:

markdown text
|       Your name       ||       Home     ||         Office              |||
| First name | Last name | address | city  | address | city  | Email       |
|:-----------|:----------|:--------|:-----:|:--------|:-----:|:------------|
| Mark       | Deep      | ss...   | NY    | ss....  | WH    | aa@acme.com |
| James      | White     | ss...   | NY    | ss..    | CA    | bb@acme.com |
| ...        | ...       | ...     | ...   | ...     | ...   | ...         |
| ...        | ...       | ...     | ...   | ...     | ...   | ...         |
| ...        | ...       | ...     | ...   | ...     | ...   | ...         |
| ...        | ...       | ...     | ...   | ...     | ...   | ...         |
Preview
Your name Home Office
First name Last name address city address city Email
Mark Deep ss... NY ss.... WH aa@acme.com
James White ss... NY ss.. CA bb@acme.com
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...

Any | added to the end of cell will be counted to determine the colspan value.

Header style

You can mark any cell to declare it as Header cell.

markdown text
|       Your name       ||       Home     ||         Office              |||
| First name | Last name | address | city  | address | city  | Email       |
|:-----------|:----------|:--------|:-----:|:--------|:-----:|:------------|
|# Mark      |# Deep     | ss...   | NY    | ss....  | WH    | aa@acme.com |
|# James     |# White    | ss...   | NY    | ss..    | CA    | bb@acme.com |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
Preview
Your name Home Office
First name Last name address city address city Email
Mark Deep ss... NY ss.... WH aa@acme.com
James White ss... NY ss.. CA bb@acme.com
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...

Start the cell with # string: Markdown will be render that cell with th tag instead of td.

Note: this feature don't works with header cells.

Cell alignment

You can customize horizontal alignment of any cell.

markdown text
|:       Your name     :||:      Home    :||:         Office            :|||
| First name | Last name | address | city  | address | city  | Email       |
|:-----------|:----------|:--------|:-----:|:--------|:-----:|:------------|
|# Mark      |# Deep     | ss...   | NY    | ss....  | WH    | aa@acme.com |
|# James     |# White    | ss...   | NY    | ss..    | CA    | bb@acme.com |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...         |
Preview
Your name Home Office
First name Last name address city address city Email
Mark Deep ss... NY ss.... WH aa@acme.com
James White ss... NY ss.. CA bb@acme.com
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...

Use the same syntax of alignment when you define it in separator-row.

Note: if you want define "left or center alignment" and "header style" together, type : before #.

markdown text
|:       Your name     :||:      Home    :||:          Office              :|||
| First name | Last name | address | city  | address | city  | Email          |
|:-----------|:----------|:--------|:-----:|:--------|:-----:|:---------------|
|# Mark      |# Deep     | ss...   | NY    | ss....  | WH    | aa@acme.com    |
|# James     |# White    | ss...   | NY    | ss..    | CA    | bb@acme.com    |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...            |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...            |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...            |
|# ...       |# ...      | ...     | ...   | ...     | ...   | ...            |
|                                                       ||||||:# 6 employees :|
Preview
Your name Home Office
First name Last name address city address city Email
Mark Deep ss... NY ss.... WH aa@acme.com
James White ss... NY ss.. CA bb@acme.com
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...
... ... ... ... ... ... ...
6 employees

The MIT License (MIT)

Copyright (c) 2013 Xilium di Flavio Spezi - Italy

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.