Skip to content

Commit 582f952

Browse files
committed
Prevent snippets editor from stripping REML p tags
If a single paragraph was entered in the snippet's editor's REML editor in form <p>content here</p>, with no inline tags the <p> tags would be stripped. This is undesirable because text outside of <p> tags may be rendered differently to text in <p> tags, so stripping the tags could change the rendering. This behaviour is changed by this commit and <p> tags are now preserved.
1 parent 5b7f2f5 commit 582f952

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Src/ActiveText.UMain.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ TActiveTextAttrNames = record
205205
/// <summary>Checks if the active text object contains only plain text.
206206
/// </summary>
207207
/// <remarks>Plain text is considered to be active text with no action
208-
/// elements except for "para". This can rendered in plain text with no
209-
/// loss of formatting.</remarks>
208+
/// elements except for "document" or "block". This can rendered in plain
209+
/// text with no loss of formatting.</remarks>
210210
function IsPlainText: Boolean;
211211
/// <summary>Checks if the active text object is a valid active text
212212
/// document.</summary>
@@ -523,8 +523,8 @@ TActiveText = class(TInterfacedObject,
523523
/// </summary>
524524
/// <remarks>
525525
/// <para>Plain text is considered to be active text with no action
526-
/// elements except for "para". This can rendered in plain text with no
527-
/// loss of formatting.</para>
526+
/// elements except for "document" or "block". This can rendered in plain
527+
/// text with no loss of formatting.</para>
528528
/// <para>Method of IActiveText.</para>
529529
/// </remarks>
530530
function IsPlainText: Boolean;
@@ -909,7 +909,7 @@ function TActiveText.IsPlainText: Boolean;
909909
for Elem in fElems do
910910
begin
911911
if Supports(Elem, IActiveTextActionElem, ActionElem)
912-
and not (ActionElem.Kind in [ekPara, ekDocument]) then
912+
and not (ActionElem.Kind in [ekBlock, ekDocument]) then
913913
Exit(False);
914914
end;
915915
Result := True;

0 commit comments

Comments
 (0)