Skip to content

Snippets editor sometimes strips <p> REML tags #103

Closed
@delphidabbler

Description

@delphidabbler

When editing a snippet that has a description or extra information that contains a single paragraph embedded in <p>..</p> REML tags, the tags are getting stripped and the paragraph is treated as plain text.

That was OK before issues #81 and #82 got fixed, but now it's causing active text that should be treated as a paragraph to be treated as an un-formatted block.

Activity

self-assigned this
on Apr 8, 2023
delphidabbler

delphidabbler commented on Apr 8, 2023

@delphidabbler
OwnerAuthor

Problem could be here:

function TActiveText.IsPlainText: Boolean;
var
  Elem: IActiveTextElem;
  ActionElem: IActiveTextActionElem;
begin
  for Elem in fElems do
  begin
    if Supports(Elem, IActiveTextActionElem, ActionElem)
      and not (ActionElem.Kind in [ekPara, ekDocument]) then
      Exit(False);
  end;
  Result := True;
end;

Need to change test

    if Supports(Elem, IActiveTextActionElem, ActionElem)
      and not (ActionElem.Kind in [ekPara, ekDocument]) then

to

    if Supports(Elem, IActiveTextActionElem, ActionElem)
      and not (ActionElem.Kind in [ekBlock, ekDocument]) then
added a commit that references this issue on Apr 8, 2023
483496a
delphidabbler

delphidabbler commented on Apr 8, 2023

@delphidabbler
OwnerAuthor

Fixed by merge commit 483496a

added
completedWork has been completed on this issue and changes have been committed to `develop` branch..
and removed
acceptedAccepted for implementation / fixing
on Apr 8, 2023
moved this to Done - Awaiting Release in CodeSnipon May 23, 2023
moved this from Done - Awaiting Release to Done - released in CodeSnipon May 23, 2023
added a commit that references this issue on Jul 13, 2023
1cbfeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugBug reportcompletedWork has been completed on this issue and changes have been committed to `develop` branch..

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @delphidabbler

      Issue actions

        Snippets editor sometimes strips `<p>` REML tags · Issue #103 · delphidabbler/codesnip