Dear SQL Developer team,
When you format the following code in SQL Developer 23.1 or SQLcl 23.3
begin
dbms_output.put_line(';/');
end;
/
then the formatter result looks similar to this:
begin
dbms_output.put_line(';
/');
end;
/
The result might differ based on the formatter settings. However, what always happens is that a line break is added between the semicolon and the slash. This might break the code.
A SQLDev user reported this issue based on real code that used encoded HTML entities followed by a slash in strings, e.g. '</'.
Here's also a screenshot that shows the problem in SQLcl:

The culprit is the format method in the oracle.dbtools.app.Format class (at the end).
It would be nice if this could be fixed in one of the coming versions.
Thank you very much.