Skip to content

Commit

Permalink
Clean Up, put demos, enabled TxtMark extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel A. Risco-Castillo
  • Loading branch information
mriscoc committed Feb 17, 2018
1 parent ae559c0 commit fa4045b
Show file tree
Hide file tree
Showing 24 changed files with 4,727 additions and 3,351 deletions.
123 changes: 0 additions & 123 deletions .gitignore

This file was deleted.

35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
# FPC-markdown
FPC-markdown
============

Markdown Processor for FPC.

## Basic Information
Basic Information
-----------------

This is a Pascal (FPC) library that processes markdown to HTML.
At present the following dialects of markdown are supported:

* The Daring Fireball dialect (see https://daringfireball.net/projects/markdown/) (translated from https://github.com/rjeschke/txtmark)
* The Daring Fireball dialect
(see <https://daringfireball.net/projects/markdown/>)

Wishlist: PEGDown (Github dialect), CommonMark
* Enhanced TxtMark dialect
(translated from <https://github.com/rjeschke/txtmark>)

All you need to use the library is any unicode version of FPC.
Wishlist: PEGDown (Github dialect), CommonMark, etc.

All you need to use the library is FPC version 3.0.4 or newer.

## Using the Library

Create a TMarkdownProcessor (MarkdownProcessor.pas) of the dialect you want:

Declare a variable of the class TMarkdownProcessor:

var
md : TMarkdownProcessor;


Create a TMarkdownProcessor (MarkdownProcessor.pas) of the dialect you want:

md := TMarkdownProcessor.createDialect(mdDaringFireball)

Decide whether you want to allow active content
Expand All @@ -32,20 +41,24 @@ Generate HTML fragments from Markdown content:

html := md.process(markdown);

Note that the HTML returned is an HTML fragment, not a full HTML page.
Note that the HTML returned is an HTML fragment, not a full HTML page.

Do not forget to dispose the object after the use:

md.free

## License

Copyright (C) Miguel A. Risco-Castillo

FPC-markdown Implementation is a fork of Grahame Grieve <grahameg@gmail.com>
Delphi-markdown (pascal port)
FPC-markdown implementation is a fork of Grahame Grieve pascal port
[Delphi-markdown](https://github.com/grahamegrieve/delphi-markdown)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Binary file removed demo/MarkDownTests.ico
Binary file not shown.
86 changes: 0 additions & 86 deletions demo/MarkDownTests.lps

This file was deleted.

Binary file removed demo/MarkDownTests.res
Binary file not shown.
86 changes: 0 additions & 86 deletions demo/backup/MarkDownTests.lps

This file was deleted.

Loading

0 comments on commit fa4045b

Please sign in to comment.