Skip to content

Commit

Permalink
Merge pull request #154 from sempare/dev
Browse files Browse the repository at this point in the history
Release 1.7.2
  • Loading branch information
darnocian authored Aug 12, 2023
2 parents 3481d93 + 7e91653 commit 16d4d46
Show file tree
Hide file tree
Showing 34 changed files with 1,633 additions and 232 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ type
end;
begin
var tpl := Template.Parse(
'My name is <% name %>.'#13#10 +
'My favourite sport is <% favourite_sport %>.'#13#10 +
'Counting... <% for i := 1 to count %><% i %><% betweenitems %>, <% end %>'
);
'My name is <% name %>.'#13#10 +
'My favourite sport is <% favourite_sport %>.'#13#10 +
'Counting... <% for i := 1 to count %><% i %><% betweenitems %>, <% end %>' +
'Counting... <% for i := 1 to count ; print(i) ; betweenitems ; print(', '); onbegin; print('[ '); onend; print('] '); end %>'
);
var info : TInformation;
info.name := 'conrad';
info.favourite_sport := 'ultimate';
Expand Down
4 changes: 3 additions & 1 deletion Sempare.Template.Tester.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ uses
Sempare.Template.Test in 'tests\Sempare.Template.Test.pas',
Sempare.Template.TestStackFrame in 'tests\Sempare.Template.TestStackFrame.pas',
Sempare.Template.TestLexer in 'tests\Sempare.Template.TestLexer.pas',
Sempare.Template.TestFunctions in 'tests\Sempare.Template.TestFunctions.pas';
Sempare.Template.TestFunctions in 'tests\Sempare.Template.TestFunctions.pas',
Sempare.Template.TestVirtualMethods in 'tests\Sempare.Template.TestVirtualMethods.pas',
Sempare.Template.TestMap in 'tests\Sempare.Template.TestMap.pas';

var
runner: ITestRunner;
Expand Down
12 changes: 5 additions & 7 deletions Sempare.Template.Tester.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
<DCCReference Include="tests\Sempare.Template.TestStackFrame.pas"/>
<DCCReference Include="tests\Sempare.Template.TestLexer.pas"/>
<DCCReference Include="tests\Sempare.Template.TestFunctions.pas"/>
<DCCReference Include="tests\Sempare.Template.TestVirtualMethods.pas"/>
<DCCReference Include="tests\Sempare.Template.TestMap.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
Expand Down Expand Up @@ -182,20 +184,16 @@
</DeployClass>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
</Deployment>
<Platforms>
<Platform value="Android">False</Platform>
<Platform value="Android64">False</Platform>
<Platform value="iOSDevice64">False</Platform>
<Platform value="iOSSimARM64">False</Platform>
<Platform value="Linux64">False</Platform>
<Platform value="OSX64">False</Platform>
<Platform value="OSXARM64">False</Platform>
<Platform value="Win32">True</Platform>
Expand Down
2 changes: 1 addition & 1 deletion boss.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Sempare Template Engine",
"description": "Sempare Template Engine for Delphi allows for flexible text manipulation. It can be used for generating email, html, source code, xml, configuration, etc.",
"version": "1.7.1",
"version": "1.7.2",
"homepage": "https://github.com/sempare/sempare-delphi-template-engine",
"mainsrc": "./src/",
"projects": [],
Expand Down
154 changes: 110 additions & 44 deletions demo/SempareTemplatePlayground/Sempare.Template.PlaygroundForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
Left = 0
Top = 0
Caption = 'Sempare Template Engine Playground'
ClientHeight = 487
ClientWidth = 1176
ClientHeight = 505
ClientWidth = 1190
Color = clBtnFace
Constraints.MinHeight = 500
Constraints.MinWidth = 1050
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OnCreate = FormCreate
OnResize = FormResize
DesignSize = (
1176
487)
1190
505)
TextHeight = 13
object Image1: TImage
Left = 24
Expand Down Expand Up @@ -301,17 +302,17 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
object Panel1: TPanel
Left = 18
Top = 224
Width = 1136
Height = 255
Width = 1150
Height = 273
Anchors = [akLeft, akTop, akRight, akBottom]
Caption = 'Panel1'
TabOrder = 4
ExplicitWidth = 1132
ExplicitHeight = 254
ExplicitWidth = 1144
ExplicitHeight = 267
object Splitter1: TSplitter
Left = 465
Top = 1
Height = 253
Height = 271
ExplicitLeft = 504
ExplicitTop = 48
ExplicitHeight = 100
Expand All @@ -320,60 +321,90 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
Left = 1
Top = 1
Width = 464
Height = 253
Height = 271
ActivePage = tsTemplate
Align = alLeft
TabOrder = 0
ExplicitHeight = 252
ExplicitHeight = 265
object tsTemplate: TTabSheet
Caption = 'Template'
object Panel2: TPanel
Left = 0
Top = 0
Width = 456
Height = 225
Height = 243
Align = alClient
BevelOuter = bvNone
Caption = 'Panel2'
TabOrder = 0
ExplicitHeight = 224
ExplicitHeight = 237
object memoTemplate: TMemo
Left = 0
Top = 17
Top = 23
Width = 456
Height = 208
Height = 220
Align = alClient
ScrollBars = ssBoth
TabOrder = 0
WantTabs = True
OnChange = memoTemplateChange
OnKeyUp = memoTemplateKeyUp
OnMouseDown = memoTemplateMouseDown
ExplicitHeight = 207
ExplicitHeight = 214
end
object Panel3: TPanel
Left = 0
Top = 0
Width = 456
Height = 17
Height = 23
Align = alTop
Caption = 'Panel3'
ShowCaption = False
TabOrder = 1
object lblPosition: TLabel
AlignWithMargins = True
Left = 4
Left = 232
Top = 4
Width = 448
Height = 17
Align = alTop
Width = 220
Height = 15
Align = alRight
Alignment = taRightJustify
AutoSize = False
Caption = '(Line: 1, Position: 1)'
Transparent = False
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 456
Color = 6908265
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentColor = False
ParentFont = False
Transparent = True
ExplicitTop = 1
ExplicitHeight = 9
end
object lblTiming: TLabel
AlignWithMargins = True
Left = 4
Top = 4
Width = 225
Height = 15
Align = alLeft
AutoSize = False
Caption = 'lblTiming'
Color = 6908265
Enabled = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentColor = False
ParentFont = False
Transparent = True
ExplicitLeft = 3
ExplicitTop = 1
ExplicitHeight = 21
end
end
end
Expand All @@ -385,7 +416,7 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
Left = 0
Top = 0
Width = 456
Height = 225
Height = 243
Align = alClient
Lines.Strings = (
'memoPrettyPrint')
Expand All @@ -398,20 +429,20 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
object pcOutput: TPageControl
Left = 468
Top = 1
Width = 667
Height = 253
ActivePage = tsWebBrowser
Width = 681
Height = 271
ActivePage = tsGithubHelp
Align = alClient
TabOrder = 1
ExplicitWidth = 663
ExplicitHeight = 252
ExplicitWidth = 675
ExplicitHeight = 265
object tsOutput: TTabSheet
Caption = 'Output'
object memoOutput: TMemo
Left = 0
Top = 0
Width = 659
Height = 225
Width = 673
Height = 243
Align = alClient
Lines.Strings = (
'Memo1')
Expand All @@ -426,14 +457,36 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
object WebBrowser1: TWebBrowser
Left = 0
Top = 0
Width = 659
Height = 225
Width = 673
Height = 243
Align = alClient
TabOrder = 0
ExplicitWidth = 655
ExplicitHeight = 224
ControlData = {
4C0000001C440000411700000000000000000000000000000000000000000000
4C0000008E4500001D1900000000000000000000000000000000000000000000
000000004C000000000000000000000001000000E0D057007335CF11AE690800
2B2E126208000000000000004C0000000114020000000000C000000000000046
8000000000000000000000000000000000000000000000000000000000000000
00000000000000000100000000000000000000000000000000000000}
end
end
object tsGithubHelp: TTabSheet
Caption = 'Github Help'
Enabled = False
ImageIndex = 2
object wbHelp: TWebBrowser
Left = 0
Top = 0
Width = 673
Height = 243
Align = alClient
TabOrder = 0
SelectedEngine = EdgeOnly
ExplicitWidth = 667
ExplicitHeight = 237
ControlData = {
4C0000008E4500001D1900000000000000000000000000000000000000000000
000000004C000000000000000000000001000000E0D057007335CF11AE690800
2B2E126208000000000000004C0000000114020000000000C000000000000046
8000000000000000000000000000000000000000000000000000000000000000
Expand All @@ -445,12 +498,12 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
object gbOptions: TGroupBox
Left = 483
Top = 49
Width = 670
Height = 145
Width = 684
Height = 139
Anchors = [akLeft, akTop, akRight]
Caption = 'Context Options'
TabOrder = 5
ExplicitWidth = 666
ExplicitWidth = 678
object cbConvertTabsToSpaces: TCheckBox
Left = 18
Top = 23
Expand Down Expand Up @@ -585,7 +638,7 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
object cbOptimiseTemplate: TCheckBox
Left = 384
Top = 92
Width = 159
Width = 113
Height = 17
Caption = 'Optimise Template'
TabOrder = 13
Expand All @@ -603,7 +656,7 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
object cbFlattenTemplate: TCheckBox
Left = 384
Top = 69
Width = 153
Width = 113
Height = 17
Caption = 'Flatten Template'
TabOrder = 15
Expand All @@ -612,7 +665,7 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
object cbShowWhitespace: TCheckBox
Left = 384
Top = 115
Width = 159
Width = 113
Height = 17
Caption = 'Show Whitespace'
TabOrder = 16
Expand Down Expand Up @@ -640,17 +693,30 @@ object FormTemplateEnginePlayground: TFormTemplateEnginePlayground
TabOrder = 0
OnGetEditText = propertiesGetEditText
OnSetEditText = propertiesSetEditText
ColWidths = (
150
282)
end
end
object butEval: TButton
Left = 389
Left = 384
Top = 194
Width = 75
Height = 25
Caption = '&Evaluate'
TabOrder = 7
OnClick = butEvalClick
end
object butExtractVars: TButton
Left = 483
Top = 194
Width = 94
Height = 25
Caption = 'E&xtract Variables'
DisabledImageName = 'butExtractVars'
TabOrder = 8
OnClick = butExtractVarsClick
end
object OpenDialog1: TOpenDialog
Left = 744
Top = 160
Expand Down
Loading

0 comments on commit 16d4d46

Please sign in to comment.