diff --git a/CHANGELOG.md b/CHANGELOG.md index 15b4636c7..d3fbdcf23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,40 @@ Releases are listed in reverse version number order. > Note that _CodeSnip_ v4 was developed in parallel with v3 for a while. As a consequence some v3 releases have later release dates than early v4 releases. +## Release v4.26.0 of 02 May 2025 + +* Updated the dialogue box displayed when saving units and annotated source code [issue #166]: + * The _File Encoding_ drop down list control is disabled if there is only one encoding option. + * Updated and clarified the naming of encodings in the _File Encoding_ drop down list. + * The sole encoding option displayed for the _Rich text file_ file type was changed from the erroneous ANSI to the correct ASCII. +* Fixed bug where, when ANSI encoding was selected in the _Save Unit_ and _Save Annotated Source_ dialogue boxes, snippets containing characters not supported in the default locale's code page were being rendered diffently in the Preview dialogue box to when saved to file [issue #164]. The previewed code is now the same as that of the saved source code. +* Updated file formats available when the _File | Save Snippet Information_ menu option is selected: + * Syntax highlighting of the existing RTF format output is now optional. + * Added the option to save snippet information in the following new formats: + * Plain text, in UTF-8, UTF-16LE, UTF-16BE and the system locale's default ANSI code page. [issue #162] + * HMTL 5 with optional syntax highlighting, in UTF-8 format [issue #153]. + * XHTML with optional syntax highlighting, in UTF-8 format [issue #153]. + * Markdown, in UTF-8, UTF-16LE, UTF-16BE and the system locale's default ANSI code page [issue #155]. + * Changed the _Save Snippet Information_ dialogue box: + * It is now based on that used for saving unit and annotated source code in that file encoding and snippet highlighting can be customised where relevant, although the _Comment style_ controls are disabled since they are not relevant. + * The suggested file name was changed from "SnippetInfo" to the display name of the selected snippet. + * The dialogue box caption now contains the display name of the selected snippet. +* Changed the title of the _Save Annotated Source_ dialogue box when displaying snippets. +* Added option to prevent descriptive comments from appearing in the implementation section of generated units. A check box for this option has been added to the _Code Formatting_ tab of the _Preferences_ dialogue box [issue #85]. +* The _Help | CodeSnip News Blog_ menu item was changed to link to the [DelphiDabbler Blog](https://delphidabbler.blogspot.com/) instead of the CodeSnip Blog, because the latter is to be closed down. The menu item was renamed to _Help | CodeSnip News On DelphiDabbler Blog_ [issue #161]. +* Improved how the CSS used in generated HTML 5 and XHTML files is generated: + * The ordering of CSS selectors can now be pre-determined. + * CSS lengths and sizes can now be specified in units, such as `em`, instead of just pixels. +* Refactored the `USourceGen` unit to remove an unnecessary dependency on user preferences [issue #167]. +* Updated the help file: + * Re changes when saving snippet information [issue #163]. + * Re changes to the _Save Unit_ and _Save Annotated Source_ dialogue boxes. + * Re changes to the blog linked from the _Help_ menu. + * Re the new option to inhibit comments in the implementation sections of generated units. +* Updated documentation: + * File format documentation was changed re the addition of the Markdown file format and the changes to the encodings used in saved files. + * Read-me files were updated re the change of news blog. + ## Release v4.25.0 of 19 April 2025 * Added new feature to save snippet information to file in RTF format using the new _File | Save Snippet Information_ menu option [issue #140]. @@ -15,7 +49,7 @@ Releases are listed in reverse version number order. * Overhauled rich text format processing: * Fixed bug where Unicode characters that don't exist in the system code page were not being displayed correctly [issue #157]. * Fixed potential bug where some reserved ASCII characters may not be escaped properly [issue #159]. - * Refactored and improved the rich text handling code [issue #100]. + * Refactored and improved the rich text handling code [issue #100]. * Corrected the copyright date displayed in the About Box to include 2025 [issue #149]. * Documentation changes: * Fixed error in the export file formation documentation and related help topic [issue #151]. diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index d6a57c49a..915d7098f 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -167,7 +167,7 @@
- There have been several versions of this file. The current one is version 19. The change to version 19 came with CodeSnip v4.21.0 and the addition of the [Compilers] section and the CanAutoInstall
key in the [Cmp:XXX] sections.
+ There have been several versions of this file. The current one is version 20. The change to version 20 came with CodeSnip v4.26.0 and the addition of the UseCommentsInUnitImpl
key in the [Prefs:SourceCode]
section.
@@ -771,7 +771,7 @@
1
.
19
.
+ The current value is 20
.
True
⇒ truncate the description; False
⇒ use the full description.
UseCommentsInUnitImpl
(Boolean)
+ True
⇒ emit comments in both the interface and implementation sections; False
⇒ emit comments in the interface section only.
+ UseSyntaxHiliting
(Boolean)
- In the first case the snippet is always saved in rich text format. + In the first case the snippet information can be saved as one of the following file types:
+In the second two cases the following file types can be chosen by the user:
@@ -88,7 +106,7 @@- There is no specific file format for these files, except that HTML 5, XHTML and RTF + There is no specific file format for these files, except that HTML 5, XHTML, RTF and Markdown files conform to published specifications.
@@ -97,11 +115,7 @@- In the first case the RTF is always saved in ASCII format. -
- -- In the 2nd and 3rd cases the encodings used depend on the file type and user choice. Different file + The available encodings depend on the file type and user choice. Different file types have different encoding choices, as follows:
@@ -118,10 +132,10 @@+ When descriptive comments are enabled, they are included in the interface + section of generated units. You can choose whether or not such comments + are repeated in the unit's implementation section using the Repeat + comments in unit implementation section check box. +
Note: Descriptive comments are not applicable to freeform or diff --git a/Src/Help/HTML/dlg_saveinfo.htm b/Src/Help/HTML/dlg_saveinfo.htm index 53abcca9d..e35745cdb 100644 --- a/Src/Help/HTML/dlg_saveinfo.htm +++ b/Src/Help/HTML/dlg_saveinfo.htm @@ -28,21 +28,92 @@
This dialogue box is displayed when the File | Save Snippet - Information menu option is clicked. It is used to specify the - name of the file into which information about the currently selected - snippet is to be saved. + Information menu option is clicked. It is used to specify the file + name, file type and encoding information for the snippet information + that is to be saved.
- The saved snippet information is written in rich text format. + The dialogue is a standard Windows save dialogue box with a few added + options.
- This dialogue is a standard Windows save dialogue box. You specify the - name and folder for the file in the usual way. + You specify the name and folder for the file where the snippet information + is to be written in in the usual way.
- Use the Save button to write the file to disk or press + Use the Save as type drop down list to specify the type of file + to be saved. Options are: +
++ The HTML 5 and XHTML options are very similar and differ only in the + type of HTML that is written. For either type an embedded CSS style + sheet is used to style the document. +
++ When any of the HTML 5, XHTML or rich text file types are selected source + code embedded in the snippet information will be syntax highlighted if + the Use syntax highlighting check box is checked. +
++ The output file encoding can be be specified in the File Encoding + drop down list. Options vary depending on the file type. Some file types + support only a single encoding. The encodings are: +
+nnn
– ANSI encoding for the system default code page,
+ where nnn
is the code page for the user's locale.
+ Available as an option for plain text and Markdown file formats.
+ + The output can be previewed by clicking the Preview button. This + displays the snippet information in a dialogue box, formatted according to your + selections. Text in the preview can be selected and copied to the + clipboard if required. +
++ Use the Save button to write the snippet information to disk or choose Cancel to abort.
++ Warning: When plain text or Markdown formatted + snippet information is written in ANSI format it is possibe that the information + contains characters that can't be represented in the system default ANSI encoding. + If this happens a warning + dialogue box is displayed whenever the snippet information is written to file + or is previewed. +
++ † BOM = Byte Order Mark or Preamble: a sequence of bytes at the + start of a text file that identifies its encoding. +