1- # FPC-markdown
1+ FPC-markdown
2+ ============
23
34Markdown Processor for FPC.
45
5- ## Basic Information
6+ Basic Information
7+ -----------------
68
79This is a Pascal (FPC) library that processes markdown to HTML.
810At 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
2534Decide 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
3952Copyright (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
4457Licensed under the Apache License, Version 2.0 (the "License");
4558you may not use this file except in compliance with the License.
4659You 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
5063Unless required by applicable law or agreed to in writing, software
5164distributed under the License is distributed on an "AS IS" BASIS,
0 commit comments