An open API service indexing awesome lists of open source software.

https://github.com/etheadev/markdownprocessor

A Markdown Processor Library for Delphi, to process and convert markdown files to HTML.
https://github.com/etheadev/markdownprocessor

Last synced: 3 months ago
JSON representation

A Markdown Processor Library for Delphi, to process and convert markdown files to HTML.

Awesome Lists containing this project

README

          

code{
font-family: "Consolas", monospace;
}
pre{
border: 1px solid #ddd;
border-left: 3px solid #f36d33;
overflow: auto;
padding: 1em 1.5em;
display: block;
}
Blockquote{
border-left: 3px solid #d0d0d0;
padding-left: 0.5em;
margin-left:1em;
}
Blockquote p{
margin: 0;
}
table{
border:1px solid;
border-collapse:collapse;
}
th{ padding:5px;
border:1px solid;
}
td{
padding:5px;
border:1px solid;
}

Markdown Processor and MarkDownToHTML.exe utilityLicense


A Markdown Processor Library for Delphi, to process/convert markdown files to HTML.


A Useful utility: MarkDownToHTML.exe to transform any markdown file to HTML


Latest Version 1.3.0 - 21 Aug 2025


Support Delphi


This library is compatible from Delphi XE3 version to latest.


www.embarcadero.com - learndelphi.org




Using the MarkDownToHTML.exe utility


With MarkDownToHTML.exe you can transform a markdown file to HTML using different markdown dialects or StyleSheet.


Download the utility.


run MarkDownToHTML.exe help processfile for a complete help.


Look into Cmd\MarkdownToHTML\Test\MarkDownToHTML_Test.cmd for examples




Basic Informations for Delphi users


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



Using the Library with Delphi


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


       md.AllowUnSafe := true;


Note: you should only set this to true if you need to - active content can be a significant safety/security issue.


Generate HTML fragments from Markdown content:


       html := md.process(markdown);


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


Do not forget to dispose of the object after the use:


       md.free


Large rework was made for adding support for tables, math formulas, etc.


Delphi projects Examples


This library is used in two projects:



A collection of tools for markdown files, to edit and view content, with an advanced Editor:


Markdown Text Editor



An integrated help system based on files in Markdown format (and also html), for Delphi applications:


Markdown HelpViewer


Release Notes


21 Aug 2025: ver. 1.3.0



  • Added support for Delphi 13

  • Added command line utility MarkDownToHTML.exe


08 Apr 2025: ver. 1.2.0



  • Fixed const parameters


16 Dec 2024: ver. 1.1.0



  • Updated Demo for FireMonkey


22 Oct 2023: ver. 1.0.0



  • Project forked from FPC-markdown by Miguel A. Risco-Castillo

  • Removed unused Dialect mdAsciiDoc

  • changed position of enumerated dialect mdCommonMark for backward compatibility with Delphi-Markdown


License


Copyright (c) Ethea S.r.l.


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


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Contributors


MarkdownProcessor implementation is a fork of FPC-markdown by Miguel A. Risco-Castillo
FPC-markdown


FPC-markdown implementation is a fork of Grahame Grieve pascal port
Delphi-markdown




MarkDownToHTML.exe is a CLI based on the project:


Italian Delphi Day 2020: Una CLI che i tuoi utenti ameranno


by Marco Breveglieri


Go to Slides and Demos page…


It also uses CommandLineParser


VSoft.CommandLineParser


by Vincent Parret, licensed under the Apache License, Version 2.0 (the “License”);