From ab99669d6bafa648e40454947100636585548ca3 Mon Sep 17 00:00:00 2001 From: gambas Date: Thu, 18 Mar 2021 17:22:59 +0100 Subject: [PATCH] TextEditor: Add documentation. [GB.FORM.EDITOR] * NEW: TextEditor: Add documentation. --- comp/src/gb.form.editor/.src/_TextEditor_Line.class | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/comp/src/gb.form.editor/.src/_TextEditor_Line.class b/comp/src/gb.form.editor/.src/_TextEditor_Line.class index d7e8f01d3..f0b7730b3 100644 --- a/comp/src/gb.form.editor/.src/_TextEditor_Line.class +++ b/comp/src/gb.form.editor/.src/_TextEditor_Line.class @@ -151,6 +151,14 @@ Private Function InitialState_Read() As _TextEditor_State End +'' Purge the line from its comments and/or strings, according to its highlighting. +'' +'' - If ~KeepComment~ is set, the comments are kept intact. Comments are the characters associated with [Highlight.Comment](/comp/gb.eval/highlight/comment) or [Highlight.Help](/comp/gb.eval/highlight/help) styles. +'' - If ~KeepString~ is set, the strings are kept intact. Strings are the characters associated with [Highlight.String](/comp/gb.eval/highlight/string) style. +'' - ~Replace~ is the character that replaces the removed elements. By default it is a space. +'' +'' If the line is not highlighted, then it is returned as is. + Public Sub Purge(Optional KeepComment As Boolean, KeepString As Boolean, Replace As String = " ") As String Dim hDoc As CDocument = GetDoc()