Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of emacs tables. #9

Merged
merged 1 commit into from Feb 14, 2013
Merged

Support of emacs tables. #9

merged 1 commit into from Feb 14, 2013

Conversation

opestov
Copy link
Contributor

@opestov opestov commented Feb 13, 2013

Tomas,

I've added support of emacs-like tables. Here is the list of tests that I've used. It also shows possible syntax.

| Markdown | Less      | Pretty                             |
|----------+:---------:+-----------------------------------:|
| *Still*  | `renders` | **nicely**                         |
| 1        | 2         | [Try F# 3.0](http://tryfsharp.org) |

Markdown|Less|Pretty
|-|:-:|-:
*Still*|`renders`|**nicely**
1|2|[Try F# 3.0](http://tryfsharp.org)|

|---|:-:|--:|
*Still*|`renders`|**nicely**
1|2|[Try F# 3.0](http://tryfsharp.org)

fruit| price
-----|-----:
apple|2.05
pear|1.37
orange|3.09

+--------------------+--------------------+--------------------+
|    begin           |Code on `C`:        |**Bold**, _italic_, |
|      writeln('A'); |                    |`code` and          |
|    end.            |    int main() {    |[link](http://url). |
|                    |      printf("A\n");|                    |
|Code on `Pascal`    |      return 0;     |Second paragraph.   |
|with comments.      |    }               |                    |
+--------------------+--------------------+--------------------+
|Quote by Donald     |Nested tables:      |List:               |
|Knuth:              |                    |                    |
|                    ||first|second|      |1. First item       |
|> Beware of bugs    |-:|:-               |2. Second item      |
|> in the above code;|key|value           |   * unordered list |
|> I have only proved|                    |3. Third item       |
|> it correct, not   |:-|-:               |                    |
|> tried it.         |first|second        |   Some text that   |
|                    |key|value           |   should be aligned|
+--------------------+--------------------+--------------------+

+----------+----------+
|fruit     |price     |
+==========+==========+
|apple     |2.05      |
+----------+----------+
|pear      |1.37      |
+----------+----------+

+:---------+---------:+
|fruit     |price     |
+==========+==========+
|apple     |2.05      |
+----------+----------+
|pear      |1.37      |
+----------+----------+

I've also refactored code (a little bit) that works with pipe tables and fixed one bug.

The next feature I miss in FSharp.Markdown is mathematics. Hope I will have time to work on it in the nearest future.

Also fix incorrect order of cases in PipeTableBlock.
Previous implementation didn't recognize pipe tables without header.
@tpetricek
Copy link
Member

Nice work, thanks very much for the contribution! (I'm traveling a bit at the moment, but I'll release a new NuGet package ASAP.)

tpetricek added a commit that referenced this pull request Feb 14, 2013
@tpetricek tpetricek merged commit af96624 into fsprojects:master Feb 14, 2013
@opestov opestov deleted the emacs-tables branch February 15, 2013 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants