Skip to content

Commit 277adba

Browse files
committed
Merge branch 'feature/99-add-new-reml-entity' into develop
2 parents 8e83b56 + dfa315b commit 277adba

File tree

6 files changed

+66
-17
lines changed

6 files changed

+66
-17
lines changed

Docs/Design/FileFormats/export.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
66
* obtain one at https://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: Export
1111
-->
@@ -300,9 +300,13 @@ <h2>
300300
encoded in REML markup. REML v4 is supported.
301301
</li>
302302
<li>
303-
<span class="highlight">version 7.3 and later:</span> Content is formatted text
303+
<span class="highlight">version 7.3 and 7.4:</span> Content is formatted text
304304
encoded in REML markup. REML v5 is supported.
305305
</li>
306+
<li>
307+
<span class="highlight">version 7.5 and later:</span> Content is formatted text
308+
encoded in REML markup. REML v6 is supported.
309+
</li>
306310
</ul>
307311
</dd>
308312

@@ -447,7 +451,10 @@ <h2>
447451
<span class="highlight">versions 5 to 7.2:</span> supports REML v4.
448452
</li>
449453
<li>
450-
<span class="highlight">version 7.3 &amp; later:</span> supports REML v5.
454+
<span class="highlight">version 7.3 &amp; 7.4:</span> supports REML v5.
455+
</li>
456+
<li>
457+
<span class="highlight">version 7.5 &amp; later:</span> supports REML v6.
451458
</li>
452459
</ul>
453460
</li>
@@ -993,6 +1000,12 @@ <h2>
9931000
<dd>
9941001
Updated in time for CodeSnip v4.22.0 to add support for Delphi 12 Athens.
9951002
</dd>
1003+
<dt>
1004+
<em>Version 7.5 - 2 April 2014</em>
1005+
</dt>
1006+
<dd>
1007+
Added support for REML v6, which is backward compatible with REML v4.
1008+
</dd>
9961009
</dl>
9971010
</dd>
9981011
</dl>
@@ -1042,7 +1055,7 @@ <h2>
10421055
</p>
10431056

10441057
<p>
1045-
Readers of v2 files and later can parse REML as v5, since all versions of REML up to v5 are backwards compatible.
1058+
Readers of v2 files and later can parse REML as v6, since all versions of REML up to v6 are backwards compatible.
10461059
</p>
10471060

10481061
</section>

Docs/Design/FileFormats/main-db.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
66
* obtain one at https://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: Main Database
1111
-->
@@ -928,7 +928,7 @@ <h2>
928928
<ol>
929929
<li id="footnote-1">
930930
<p>
931-
REML is a text markup language used to format text. REML version 5 is supported. The REML format is documented <a href="../reml.html">here</a>.
931+
REML is a text markup language used to format text. REML version 6 is supported. The REML format is documented <a href="../reml.html">here</a>.
932932
</p>
933933
</li>
934934
<li id="footnote-2">

Docs/Design/FileFormats/user-db.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
66
* obtain one at https://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: User Database
1111
-->
@@ -325,9 +325,13 @@ <h3 id="xml-file">
325325
encoded in REML markup. REML v4 is supported.
326326
</li>
327327
<li>
328-
<span class="highlight">version 6.11 &amp; later:</span> Content is formatted text
328+
<span class="highlight">version 6.11 &amp; 6.12:</span> Content is formatted text
329329
encoded in REML markup. REML v5 is supported.
330330
</li>
331+
<li>
332+
<span class="highlight">version 6.13 &amp; later:</span> Content is formatted text
333+
encoded in REML markup. REML v6 is supported.
334+
</li>
331335
</ul>
332336
</dd>
333337

@@ -472,7 +476,10 @@ <h3 id="xml-file">
472476
<span class="highlight">versions 5 &amp; 6.10:</span> supports REML v4.
473477
</li>
474478
<li>
475-
<span class="highlight">version 6.11 &amp; later:</span> supports REML v5.
479+
<span class="highlight">version 6.11 &amp; 6.12:</span> supports REML v5.
480+
</li>
481+
<li>
482+
<span class="highlight">version 6.13 &amp; later:</span> supports REML v6.
476483
</li>
477484
</ul>
478485
</li>
@@ -1029,6 +1036,12 @@ <h2>
10291036
<dd>
10301037
Updated in time for CodeSnip v4.22.0 to add support for Delphi 12 Athens.
10311038
</dd>
1039+
<dt>
1040+
<em>Version 6.13 - 2 April 2024</em>
1041+
</dt>
1042+
<dd>
1043+
Updated with CodeSnip v4.23.0 to add support for REML v6, which is backwards compatible with REML v4.
1044+
</dd>
10321045
</dl>
10331046
</dd>
10341047
</dl>

Docs/Design/reml.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22

33
<!--
4-
* This file copyright (C) 2020-2023, Peter Johnson (gravatar.com/delphidabbler) and
4+
* This file copyright (C) 2020-2024, Peter Johnson (gravatar.com/delphidabbler) and
55
* is licensed under the MIT License: https://opensource.org/licenses/MIT
66
*
77
* DelphiDabbler Code Snippets Database Documentation: REML markup language
@@ -251,7 +251,7 @@ <h1>
251251
The REML language is a SGML language similar to a greatly simplified XHTML. The are a small number of tags and character entities that can be used.
252252
</p>
253253
<aside>
254-
<strong>Note:</strong> The language described here is REML v5. v4 is still in regular use in CodeSnip up to v4.20.x. Earlier versions are obsolete.
254+
<strong>Note:</strong> The language described here is REML v6. v4 is still in regular use in CodeSnip up to v4.20.x. Earlier versions are obsolete.
255255
</aside>
256256

257257
</section>
@@ -524,6 +524,10 @@ <h1>
524524
<td><code>&amp;deg;</code></td>
525525
<td>°</td>
526526
</tr>
527+
<tr>
528+
<td><code>&amp;cent;</code></td>
529+
<td>¢</td>
530+
</tr>
527531
<tr>
528532
<td><code>&amp;laquo;</code></td>
529533
<td>«</td>
@@ -536,6 +540,10 @@ <h1>
536540
<td><code>&amp;iquest;</code></td>
537541
<td>¿</td>
538542
</tr>
543+
<tr>
544+
<td><code>&amp;apos;</code></td>
545+
<td>'</td>
546+
</tr>
539547
</tbody>
540548
</table>
541549

@@ -644,8 +652,21 @@ <h1>Change Log</h1>
644652
</li>
645653
</ul>
646654

647-
</section>
655+
<p>
656+
<strong>v6 of 2024-04-02</strong>
657+
</p>
658+
659+
<p>
660+
Introduced in CodeSnip v4.23.0
661+
</p>
648662

663+
<ul>
664+
<li>
665+
Added entity: <code class="value">&amp;apos;</code>.
666+
</li>
667+
</ul>
668+
669+
</section>
649670

650671
</body>
651672

Src/Help/HTML/reml.htm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
55
* obtain one at https://mozilla.org/MPL/2.0/
66
*
7-
* Copyright (C) 2009-2023, Peter Johnson (gravatar.com/delphidabbler).
7+
* Copyright (C) 2009-2024, Peter Johnson (gravatar.com/delphidabbler).
88
*
99
* Help topic describing REML markup language.
1010
-->
@@ -43,8 +43,8 @@ <h1>
4343
<p>
4444
<em>REML</em> is <em>CodeSnip</em>'s own little markup language that can
4545
be used to style the text of a snippet's description and / or extra
46-
information. The latest version is v5, which is backwards compatible with
47-
all other versions.
46+
information. The latest version is v6, which is backwards compatible with
47+
all other versions.
4848
</p>
4949
<h2>
5050
Language Details

Src/UREMLDataIO.pas

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
44
* obtain one at https://mozilla.org/MPL/2.0/
55
*
6-
* Copyright (C) 2008-2023, Peter Johnson (gravatar.com/delphidabbler).
6+
* Copyright (C) 2008-2024, Peter Johnson (gravatar.com/delphidabbler).
77
*
88
* Implements classes that render and parse Routine Extra Markup Language (REML)
99
* code. This markup is used to read and store active text objects as used by
@@ -1035,7 +1035,7 @@ class function TREMLEntities.CharToMnemonicEntity(const Ch: Char): string;
10351035
{Class constructor. Creates map of mnemonic entities to equivalent characters.
10361036
}
10371037
begin
1038-
SetLength(fEntityMap, 34);
1038+
SetLength(fEntityMap, 35);
10391039
// Supported character entities. All are optional unless otherwise stated
10401040
// REML v1
10411041
fEntityMap[0] := TREMLEntity.Create('amp', '&'); // required in REML
@@ -1074,6 +1074,8 @@ class function TREMLEntities.CharToMnemonicEntity(const Ch: Char): string;
10741074
fEntityMap[31] := TREMLEntity.Create('laquo', '«');
10751075
fEntityMap[32] := TREMLEntity.Create('raquo', '»');
10761076
fEntityMap[33] := TREMLEntity.Create('iquest', '¿');
1077+
// REML v6
1078+
fEntityMap[34] := TREMLEntity.Create('apos', SINGLEQUOTE);
10771079
end;
10781080

10791081
class destructor TREMLEntities.Destroy;

0 commit comments

Comments
 (0)