Skip to content

Commit fa4045b

Browse files
committed
Clean Up, put demos, enabled TxtMark extensions
Signed-off-by: Miguel A. Risco-Castillo
1 parent ae559c0 commit fa4045b

24 files changed

+4727
-3351
lines changed

.gitignore

Lines changed: 0 additions & 123 deletions
This file was deleted.

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
1-
# FPC-markdown
1+
FPC-markdown
2+
============
23

34
Markdown Processor for FPC.
45

5-
## Basic Information
6+
Basic Information
7+
-----------------
68

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

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

12-
Wishlist: PEGDown (Github dialect), CommonMark
15+
* Enhanced TxtMark dialect
16+
(translated from <https://github.com/rjeschke/txtmark>)
1317

14-
All you need to use the library is any unicode version of FPC.
18+
Wishlist: PEGDown (Github dialect), CommonMark, etc.
19+
20+
All you need to use the library is FPC version 3.0.4 or newer.
1521

1622
## Using the Library
1723

18-
Create a TMarkdownProcessor (MarkdownProcessor.pas) of the dialect you want:
24+
25+
Declare a variable of the class TMarkdownProcessor:
1926

2027
var
2128
md : TMarkdownProcessor;
22-
29+
30+
Create a TMarkdownProcessor (MarkdownProcessor.pas) of the dialect you want:
31+
2332
md := TMarkdownProcessor.createDialect(mdDaringFireball)
2433

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

3342
html := md.process(markdown);
3443

35-
Note that the HTML returned is an HTML fragment, not a full HTML page.
44+
Note that the HTML returned is an HTML fragment, not a full HTML page.
45+
46+
Do not forget to dispose the object after the use:
47+
48+
md.free
3649

3750
## License
3851

3952
Copyright (C) Miguel A. Risco-Castillo
4053

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

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

48-
http://www.apache.org/licenses/LICENSE-2.0
61+
<http://www.apache.org/licenses/LICENSE-2.0>
4962

5063
Unless required by applicable law or agreed to in writing, software
5164
distributed under the License is distributed on an "AS IS" BASIS,

demo/MarkDownTests.ico

-134 KB
Binary file not shown.

demo/MarkDownTests.lps

Lines changed: 0 additions & 86 deletions
This file was deleted.

demo/MarkDownTests.res

-136 KB
Binary file not shown.

demo/backup/MarkDownTests.lps

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)