Skip to content

Commit 682a07b

Browse files
committed
Merge remote-tracking branch 'origin/master' into cupola
Merging master as at release v4.23.0 Resolved Conflicts: * Build.html * CHANGELOG.md * Docs/License.html * Docs/ReadMe.txt * LICENSE.md * README.md * Src/VCodeSnip.vi * Src/VCodeSnipPortable.vi * Src/VersionInfo.vi-inc
2 parents 21b727f + 02bad50 commit 682a07b

File tree

108 files changed

+1556
-1134
lines changed

Some content is hidden

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

108 files changed

+1556
-1134
lines changed

CONTRIBUTING.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
# Contributing
2+
3+
Thanks for you interest in contributing to the CodeSnip project.
4+
5+
## Contents
6+
7+
* [Overview](#overview)
8+
* [Issues](#issues)
9+
* [Documentation](#documentation)
10+
* [Coding](#coding)
11+
* [About Pull Requests](#about-pull-requests)
12+
* [Licensing of Contributions](#licensing-of-contributions)
13+
* [Code of Conduct](#code-of-conduct)
14+
* [Attributions](#attributions)
15+
16+
## Overview
17+
18+
Contributions of all kinds are more than welcome.
19+
20+
> 💡 You will need a GitHub account to be able to make contributions. [Sign up here](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account).
21+
22+
There three main ways in which you can contribute, each of which is explained in its own section below. From easiest to hardest, they are:
23+
24+
* [Issues](#issues) - report bugs and request new features.
25+
* [Documentation](#documentation) - improve the project's documentation.
26+
* [Coding](#coding) - modify the project's source code.
27+
28+
Regardless of how you choose to contribute, please respect the project's [code of conduct](#code-of-conduct).
29+
30+
## Issues
31+
32+
The easiest way to make a contribution is to [create an issue](https://github.com/delphidabbler/codesnip/issues/new).
33+
34+
You can use issues to:
35+
36+
1. [Report a bug](#reporting-a-bug)
37+
2. [Request a new program feature](#requesting-a-new-feature)
38+
3. [Suggest changes to documentation](#suggesting-documentation-changes)
39+
40+
It is helpful if you perform a cursory search of [existing issues](https://github.com/delphidabbler/codesnip/issues?q=is%3Aissue) to see if there is already a similar issue. If so then please add your thoughts as comments on that issue rather than open a new one.
41+
42+
### Reporting a bug
43+
44+
Before reporting a bug please make sure the bug exists in the [latest release](https://github.com/delphidabbler/codesnip/releases) of CodeSnip 4.
45+
46+
To report a bug please provide as much information about the bug as possible, including the program's version number, what happened, what you expected to happen and what you were doing at the time. If possible, explain how to reproduce the bug.
47+
48+
> 💡 You can find CodeSnip's version number in the program's About box (_Help | About_ menu option).
49+
50+
If you have resolved an issue yourself please consider contributing your fix so that others can benefit from your work. Please read the [Coding](#coding) section before doing so.
51+
52+
### Requesting a new feature
53+
54+
If you think of a feature that you would like to see added to CodeSnip you can open an issue to request it.
55+
56+
Please be as clear as possible about what you expect the feature to do and why you want it.
57+
58+
Ideas about how to implement the feature are welcome. Even better, if you have implemented the feature yourself, you may be able to contribute the code. But please read the [Coding](#coding) section before doing so.
59+
60+
### Suggesting documentation changes
61+
62+
The third reason to create an issue is if you want to suggest new documentation or ammendments to existing documentation.
63+
64+
There are two types of documentation within the CodeSnip repository. Firstly, there is general documentation that can be found in the [repository root](https://github.com/delphidabbler/codesnip/tree/develop) and in the [`Docs`](https://github.com/delphidabbler/codesnip/tree/develop/Docs) directory. Secondly, there are numerous HTML help files in the [`Src/Help/HTML`](https://github.com/delphidabbler/codesnip/tree/develop/Src/Help/HTML) directory.
65+
66+
If you have written or corrected some documentation yourself please consider submitting it. See the [Documentation](#documentation) section below to find out how to do this.
67+
68+
## Documentation
69+
70+
Writing and editing documentation is a relatively easy way to start contributing. Providing simple clear or helpful documentation for users is critical. Things that *you* found hard to understand as a user, or difficult to work out, are excellent places to begin.
71+
72+
There are two ways to contribute documentation. The preferred method is by means of a [pull request](#about-pull-requests). But, you can simply create an issue and attach documentation files to the issue comments. This approach is perfectly acceptable for a small number of files, and saves you having to install Git!
73+
74+
## Coding
75+
76+
Code contributions to the [CodeSnip 4 development tree](https://github.com/delphidabbler/codesnip/tree/develop) are always welcome, from fixing bugs to developing new features.
77+
78+
> 🐘 Before going any further, let's address the elephant in the room. CodeSnip has to be compiled with the now rather ancient Delphi XE. It would be much better if development could move to a more recent version of Delphi, but that's proving to be extremely problematic. See [this FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/SourceCode.md#faq-11) for an explanation.
79+
80+
If you're still here, you will need to set up a valid build environment in order to compile CodeSnip from source. [`Build.html`](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/develop/Build.html) tells you everything you need to know about configuring the environment, the tools you will need, and how compile CodeSnip using the provided `Makefile`.
81+
82+
> 💡 Need ideas? You can [browse open issues](https://github.com/delphidabbler/codesnip/issues) and see if you can help with any of them.
83+
84+
Contributions should normally be made using [pull requests](#about-pull-requests).
85+
86+
But, if you have just a few lines of code to suggest it _may_ be possible to accept the code within (or attached to) a comment on an issue. If in doubt, ask first by means of a comment. When including the code in a comment, please use [GitHub code fencing](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks) to format the code and make it easier to read. For example:
87+
88+
```pascal
89+
procedure TFoo.CoolNewMethod;
90+
begin
91+
// cool code here
92+
end;
93+
```
94+
95+
## About Pull Requests
96+
97+
All pull requests *must* relate to an [open _accepted_ issue](https://github.com/delphidabbler/codesnip/issues?q=is%3Aissue+label%3Aaccepted++is%3Aopen+) on GitHub.
98+
99+
If you wish to contribute code for which there is no existing issue you can create one. Please wait for the issue to be accepted by the project owner before submitting your pull request. Acceptance is indicated by attaching an "accepted" label to the issue and is signed off by means of a comment on the issue from the project owner.
100+
101+
> 💡 Should you get stuck at any point please ask for help by leaving a comment on the relevant issue.
102+
103+
Before you can start you need to get the source code. Here's how:
104+
105+
1. Fork the CodeSnip project into your own GitHub repository.
106+
107+
***Important***_Ensure that all remote branches are included in the fork_, not just `master`. On GitHub this means clearing the "Copy the `master` branch only" check box before creating the fork.
108+
109+
2. Clone the forked repository onto your own system using:
110+
111+
$ git clone https://github.com/<account>/codesnip.git
112+
113+
where `<account>` is your GitHub user account ID.
114+
115+
CodeSnip uses the [Git Flow](https://nvie.com/posts/a-successful-git-branching-model/) methodology. This means that you need to create your source code on a "feature" branch off the `develop` branch. Here's how:
116+
117+
1. Pull the `develop` branch from your forked repository, and switch into it:
118+
119+
$ git pull origin develop
120+
$ git switch develop
121+
122+
2. Create and switch to a new feature branch, branched off `develop`.
123+
124+
Name the branch `feature/` followed by the issue number to which it relates. Appending a hyphen followed by a brief description is useful too. Example branch names are `feature/42-fix-ui-bug` or `feature/56`:
125+
126+
$ git branch feature/42-fix-ui-bug
127+
$ git switch feature/42-fix-ui-bug
128+
129+
3. Make your changes, whether to source code or documentation, and commit them to your feature branch. Clarity is prefered to terseness in commit messages. Please don't squash logically unrelated commits.
130+
131+
4. If you are editing source code you need to ensure that it compiles and works as expected.
132+
133+
> 💡 Having trouble? Please make sure you have read [`Build.html`](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/develop/Build.html). If that doesn't solve your problem then ask for help by creating a comment on the relevant issue.
134+
135+
Once you have finished writing the code and are ready to submit it you need to prepare your forked repository:
136+
137+
1. Use GitHub to ensure that the `develop` branch of your fork is up to date with the parent `delphidabbler/codesnip` repository's `develop` branch.
138+
139+
2. Rebase your changes onto your forked repository's remote `develop` branch:
140+
141+
$ git rebase origin/develop feature/42-fix-ui-bug
142+
143+
3. Resolve any conflicts arising from the rebase then push your changes to your forked repository:
144+
145+
$ git push origin feature/42-fix-ui-bug
146+
147+
You are finally ready to open that pull request. Proceed as follows:
148+
149+
1. Open your forked repository on GitHub. You should see a banner saying something like "feature/42-fix-ui-bug had recent pushes ..." along with a button that says "Compare and Pull Request". Click that button.
150+
151+
2. You will be taken the "Comparing Changes" page on `delphidabbler/codesnip`.
152+
153+
***Important***⭐ Just below the page title is a line of drop-down buttons where you choose what to compare. Check the caption of the 2nd button from the left. If it reads anything other than "base: `develop`" (and it probably doesn't) then click the button and select `develop` from the list of branches that is displayed.
154+
155+
> ⚠️ Pull requests based on `master`, or any branch other than `develop`, will not be accepted.
156+
157+
3. Now complete the form and click the "Create Pull Request" button.
158+
159+
That's it.
160+
161+
Sit back and wait. Either your pull request will be accepted or you will receive comments requesting clarification or changes.
162+
163+
Once your pull request is accepted you can delete the feature branch from both your local and forked remote fork.
164+
165+
## Licensing of Contributions
166+
167+
The license that applies to any existing file you edit will continue to apply to the edited file. Any existing license text or copyright statement **must not** be altered or removed, but you can add your own copyright line if desired.
168+
169+
Any new file you contribute **must** either be licensed under the [Mozilla Public License v2.0](https://www.mozilla.org/MPL/2.0/) (MPL2) or have a license compatible with the MPL2. If a license is not specified then MPL2 will be assumed and will be applied to the file. You should insert a suitable copyright statement in the file.
170+
171+
Any third party code used by your contributed code **must** also have a license compatible with the MPL2.
172+
173+
> 💡 MPL2 boilerplate text, in several programming language's comment formats, can be found in the file [`Docs/MPL-2.0-Boilerplate.txt`](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/MPL-2.0-Boilerplate.txt). You will need to change the name of the copyright holder.
174+
175+
## Code of Conduct
176+
177+
This is a simple and straightforward code of conduct. What it boils down to is that if you're a decent person you're more than welcome here. Hateful, abusive and just plain rude people are not.
178+
179+
To be more precise, anyone who contributes to the CodeSnip project is expected to display respect, empathy and politeness towards others.
180+
181+
Certain behaviours will not be tolerated, and will result in an immediate ban. They are:
182+
183+
* Racism and hate speech in any form.
184+
* The use of sexualized language or imagery, and sexual attention or advances of any kind.
185+
* Intolerance towards people of any religion or none.
186+
* Trolling, insulting or derogatory comments, and personal or political attacks.
187+
* Public or private harassment.
188+
* Publishing others' private information, such as a physical or email address, without their explicit permission.
189+
* Other conduct which could reasonably be considered inappropriate in a professional setting.
190+
191+
## Attributions
192+
193+
1. The list of unacceptable behaviours in the Code of Conduct was taken, in part, from the "Our Standards" section of the [Contributor Covenant Code of Conduct v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
194+
195+
2. Some of the content of this document was inspired by and/or copied from the [Stumpy Contributing Guide](https://stumpy.readthedocs.io/en/latest/Contribute.html).

Docs/Design/FileFormats/config.html

Lines changed: 10 additions & 1 deletion
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-2022, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: Configuration Files
1111
-->
@@ -259,6 +259,9 @@ <h4>
259259
<li>
260260
<em>D11A</em> &ndash; Delphi 11.x Alexandria
261261
</li>
262+
<li>
263+
<em>D12Y</em> &ndash; Delphi 12 Athens
264+
</li>
262265
<li>
263266
<em>FPC</em> &ndash; Free Pascal
264267
</li>
@@ -613,6 +616,12 @@ <h4>
613616
<dd>
614617
Indicates whether Delphi 11.x Alexandria was included in the search.
615618
</dd>
619+
<dt>
620+
<code class="key">D12Y</code> (Boolean)
621+
</dt>
622+
<dd>
623+
Indicates whether Delphi 12 Athens was included in the search.
624+
</dd>
616625
<dt>
617626
<code class="key">FPC</code> (Boolean)
618627
</dt>

Docs/Design/FileFormats/export.html

Lines changed: 26 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-2022, 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>
@@ -606,6 +613,9 @@ <h2>
606613
<li>
607614
<em>d11a</em> &ndash; Delphi 11.x Alexandria compiler <span class="highlight">(v7.2 &amp; later)</span>
608615
</li>
616+
<li>
617+
<em>d12y</em> &ndash; Delphi 12 Athens compiler <span class="highlight">(v7.4 &amp; later)</span>
618+
</li>
609619
<li>
610620
<em>fpc</em> &ndash; Free Pascal compiler <span class="highlight">(all versions)</span>
611621
</li>
@@ -984,6 +994,18 @@ <h2>
984994
<dd>
985995
Updated with CodeSnip v4.21.0 to add support for REML v5, which is backward compatible with REML v4.
986996
</dd>
997+
<dt>
998+
<em>Version 7.4 - 7 November 2023</em>
999+
</dt>
1000+
<dd>
1001+
Updated in time for CodeSnip v4.22.0 to add support for Delphi 12 Athens.
1002+
</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>
9871009
</dl>
9881010
</dd>
9891011
</dl>
@@ -1033,7 +1055,7 @@ <h2>
10331055
</p>
10341056

10351057
<p>
1036-
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.
10371059
</p>
10381060

10391061
</section>

Docs/Design/FileFormats/main-db.html

Lines changed: 5 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-2022, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: Main Database
1111
-->
@@ -419,6 +419,9 @@ <h4>
419419
<li>
420420
<code class="key">Delphi11A</code> – Delphi 11.x Alexandria compiler *
421421
</li>
422+
<li>
423+
<code class="key">Delphi12A</code> – Delphi 12 Athens compiler *
424+
</li>
422425
<li>
423426
<code class="key">FPC</code> – Free Pascal compiler
424427
</li>
@@ -925,7 +928,7 @@ <h2>
925928
<ol>
926929
<li id="footnote-1">
927930
<p>
928-
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>.
929932
</p>
930933
</li>
931934
<li id="footnote-2">

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

0 commit comments

Comments
 (0)