Skip to content

Snippets editor sometimes strips <p> REML tags #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
delphidabbler opened this issue Apr 8, 2023 · 2 comments
Closed

Snippets editor sometimes strips <p> REML tags #103

delphidabbler opened this issue Apr 8, 2023 · 2 comments
Assignees
Labels
bug Bug report completed Work has been completed on this issue and changes have been committed to `develop` branch..

Comments

@delphidabbler
Copy link
Owner

delphidabbler commented Apr 8, 2023

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.

@delphidabbler delphidabbler self-assigned this Apr 8, 2023
@delphidabbler delphidabbler added accepted Accepted for implementation / fixing bug Bug report labels Apr 8, 2023
@delphidabbler
Copy link
Owner Author

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

@delphidabbler
Copy link
Owner Author

Fixed by merge commit 483496a

@delphidabbler delphidabbler added completed Work has been completed on this issue and changes have been committed to `develop` branch.. and removed accepted Accepted for implementation / fixing labels Apr 8, 2023
@delphidabbler delphidabbler added this to the Confirmed for next patch milestone Apr 8, 2023
@delphidabbler delphidabbler removed this from the Confirmed for next patch milestone Apr 9, 2023
@delphidabbler delphidabbler moved this to Done - Awaiting Release in CodeSnip May 23, 2023
@delphidabbler delphidabbler moved this from Done - Awaiting Release to Done - released in CodeSnip May 23, 2023
@delphidabbler delphidabbler removed this from CodeSnip Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report completed Work has been completed on this issue and changes have been committed to `develop` branch..
Projects
None yet
Development

No branches or pull requests

1 participant