Skip to content

Commit b5abeef

Browse files
ver. 2.0.0
- Added use of Skia4Delphi - Added support for new image format (webp and wbmp) - Uses AnimatedStyledDialogs for messages - Added toolbar for markdown commands - Added dialog for input of hyperlink for Images and Files - Updated Markdown library with best support for CommonMark transformation - Subscript text and Superscript text - Formulas (using Google Chart API) - Markers - Reference-style Links
1 parent e1a997a commit b5abeef

File tree

346 files changed

+116986
-24657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+116986
-24657
lines changed

Ext/External Projects.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
# External projects
1+
# External projects
22

33
***This project uses some External Projects, located into Ext Path***
44

5-
- [SVGIconImageList][1]
5+
- [Ethea SVGIconImageList][1]
66

7-
- [Synedit][2]
7+
- [Ethea MarkdownProcessor][2]
88

9-
- [VCL-Style-Utils][3]
9+
- [Synedit][3]
1010

11-
- [delphi-markdown][4]
11+
- [VCL-Style-Utils][4]
1212

13-
***Per comodità di ricompilazione sono stati aggiunti in questa cartella***
13+
- [dzlib][5]
14+
15+
***For simplify compilation they are added to this folder***
1416

1517
[1]: https://github.com/EtheaDev/SVGIconImageList
1618

17-
[2]: https://github.com/SynEdit/SynEdit
19+
[2]: https://github.com/EtheaDev/MarkdownProcessor
20+
21+
[3]: https://github.com/SynEdit/SynEdit
1822

19-
[3]: https://github.com/RRUZ/vcl-styles-utils
23+
[4]: https://github.com/RRUZ/vcl-styles-utils
2024

21-
[4]: https://github.com/grahamegrieve/delphi-markdown
25+
[5]: https://sourceforge.net/projects/dzlib/

Ext/HTMLViewer/Source/HTMLSubs.pas

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,23 @@ TFontObj = class(TFontObjBase) {font information}
172172
// BG, 10.02.2013: owns its objects.
173173
TFontList = class(TFontObjBaseList) {a list of TFontObj's}
174174
private
175+
{$if compilerversion > 35}
176+
function GetFont(Index: NativeInt): TFontObj; {$ifdef UseInline} inline; {$endif}
177+
{$else}
175178
function GetFont(Index: Integer): TFontObj; {$ifdef UseInline} inline; {$endif}
179+
{$ifend}
176180
public
177181
constructor CreateCopy(ASection: TSection; T: TFontList);
178182
function GetFontAt(Posn: Integer; out OHang: Integer): ThtFont;
179183
// function GetFontCountAt(Posn, Leng: Integer): Integer;
180184
function GetFontObjAt(Posn: Integer): TFontObj; overload;
181185
function GetFontObjAt(Posn, Leng: Integer; out Obj: TFontObj): Integer; overload;
182186
procedure Decrement(N: Integer; Document: ThtDocument);
187+
{$if compilerversion > 35}
188+
property Items[Index: NativeInt]: TFontObj read GetFont; default;
189+
{$else}
183190
property Items[Index: Integer]: TFontObj read GetFont; default;
191+
{$ifend}
184192
end;
185193

186194
// BG, 10.02.2013: does not own its font objects.
@@ -2605,7 +2613,11 @@ constructor TFontList.CreateCopy(ASection: TSection; T: TFontList);
26052613
end;
26062614

26072615
//-- BG ---------------------------------------------------------- 10.02.2013 --
2616+
{$if compilerversion > 35}
2617+
function TFontList.GetFont(Index: NativeInt): TFontObj;
2618+
{$else}
26082619
function TFontList.GetFont(Index: Integer): TFontObj;
2620+
{$ifend}
26092621
begin
26102622
Result := inherited Get(Index);
26112623
end;

Ext/HTMLViewer/Source/HTMLUn2.pas

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,17 @@ TFontObjBase = class {font information}
227227

228228
TFontObjBaseList = class(TObjectList)
229229
private
230+
{$if compilerversion > 35}
231+
function GetBase(Index: NativeInt): TFontObjBase; {$ifdef UseInline} inline; {$endif}
232+
{$else}
230233
function GetBase(Index: Integer): TFontObjBase; {$ifdef UseInline} inline; {$endif}
234+
{$ifend}
231235
public
236+
{$if compilerversion > 35}
237+
property Items[Index: NativeInt]: TFontObjBase read GetBase; default;
238+
{$else}
232239
property Items[Index: Integer]: TFontObjBase read GetBase; default;
240+
{$ifend}
233241
end;
234242

235243
//------------------------------------------------------------------------------
@@ -3594,7 +3602,11 @@ function ThtMap.Get(Index: Integer): TMapItem;
35943602
{ TFontObjBaseList }
35953603

35963604
//-- BG ---------------------------------------------------------- 06.10.2016 --
3605+
{$if compilerversion > 35}
3606+
function TFontObjBaseList.GetBase(Index: NativeInt): TFontObjBase;
3607+
{$else}
35973608
function TFontObjBaseList.GetBase(Index: Integer): TFontObjBase;
3609+
{$ifend}
35983610
begin
35993611
Result := inherited Get(Index);
36003612
end;

Ext/HTMLViewer/Source/htmlcons.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ are covered by separate copyright notices located in those modules.
5555
{ Identify Delphi Compiler Version:
5656
5757
# Compiler Version Compiler Defined Symbol
58+
D29 Delphi 12.0 36 VER360
59+
D28 Delphi 11.3 35 VER350
60+
D27 Delphi 10.4 34 VER340
5861
D26 Delphi 10.3 Rio 33 VER330
5962
D25 Delphi 10.2 Tokyo 32 VER320
6063
D24 Delphi 10.1 Berlin 31 VER310
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{******************************************************************************}
2+
{ }
3+
{ MarkDown Processor }
4+
{ Delphi version of FPC-markdown by Miguel A. Risco-Castillo }
5+
{ }
6+
{ Copyright (c) 2022-2023 (Ethea S.r.l.) }
7+
{ Author: Carlo Barazzetta }
8+
{ }
9+
{ https://github.com/EtheaDev/MarkdownProcessor }
10+
{ }
11+
{******************************************************************************}
12+
{ }
13+
{ Licensed under the Apache License, Version 2.0 (the "License"); }
14+
{ you may not use this file except in compliance with the License. }
15+
{ You may obtain a copy of the License at }
16+
{ }
17+
{ http://www.apache.org/licenses/LICENSE-2.0 }
18+
{ }
19+
{ Unless required by applicable law or agreed to in writing, software }
20+
{ distributed under the License is distributed on an "AS IS" BASIS, }
21+
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
22+
{ See the License for the specific language governing permissions and }
23+
{ limitations under the License. }
24+
{ }
25+
{******************************************************************************}
26+
Unit MarkdownCommonMark;
27+
28+
{
29+
Copyright (c) 2011+, Health Intersections Pty Ltd (http://www.healthintersections.com.au)
30+
All rights reserved.
31+
32+
Redistribution and use in source and binary forms, with or without modification,
33+
are permitted provided that the following conditions are met:
34+
35+
* Redistributions of source code must retain the above copyright notice, this
36+
list of conditions and the following disclaimer.
37+
* Redistributions in binary form must reproduce the above copyright notice,
38+
this list of conditions and the following disclaimer in the documentation
39+
and/or other materials provided with the distribution.
40+
* Neither the name of HL7 nor the names of its contributors may be used to
41+
endorse or promote products derived from this software without specific
42+
prior written permission.
43+
44+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
45+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
48+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
50+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
52+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
53+
POSSIBILITY OF SUCH DAMAGE.
54+
}
55+
interface
56+
57+
uses
58+
SysUtils, Classes, TypInfo,
59+
MarkdownProcessor, MarkdownDaringFireball, MarkdownUtils;
60+
61+
Type
62+
63+
TMarkdownCommonMark = class(TMarkdownDaringFireball)
64+
private
65+
protected
66+
public
67+
Constructor Create;
68+
Destructor Destroy; override;
69+
function process(source: String): String; override;
70+
end;
71+
72+
implementation
73+
74+
75+
{ TMarkdownCommonMark }
76+
77+
constructor TMarkdownCommonMark.Create;
78+
begin
79+
inherited;
80+
Config.Dialect:=mdCommonMark;
81+
end;
82+
83+
destructor TMarkdownCommonMark.Destroy;
84+
begin
85+
inherited;
86+
end;
87+
88+
function TMarkdownCommonMark.process(source: String): String;
89+
begin
90+
result:=inherited process(source);
91+
end;
92+
93+
94+
end.

0 commit comments

Comments
 (0)