Skip to content
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

HTML comments inserted in PHP files #1758

Open
elextr opened this issue Feb 2, 2018 · 3 comments
Open

HTML comments inserted in PHP files #1758

elextr opened this issue Feb 2, 2018 · 3 comments

Comments

@elextr
Copy link
Member

elextr commented Feb 2, 2018

Reported on the ML. Possibly due to this

@codebrainz
Copy link
Member

More information please.

@b4n
Copy link
Member

b4n commented Feb 2, 2018

Agreed with @codebrainz it's not very clear, but I guess I got it:

When filetypes.php has an empty comment_single, it uses HTML comments (<!-- -->) instead of multi-line PHP comments (/* */) for some reason.
To test:

  1. Open Geany with a stock configuration (geany -c /tmp/temp-config)
  2. Create a new PHP file from template
  3. Insert a non-empty line in the PHP section (e.g. echo "hello!"; on line 24)
    1. Try and comment line 24 with Ctrl+E: it inserts //~ at the start of the line. Good! Try and the same on line 31: it inserts <!-- -->. Good again! Toggle both back to not commented.
  4. Open filetypes.php (Tools → Configuration files → Filetype configuration files → Scripting languages → filetypes.php)
  5. Change the value of comment_single to make it empty. Save it.
  6. Try commenting line 24: it inserts <!-- --> 😞

@elextr
Copy link
Member Author

elextr commented Feb 2, 2018

@b4n thanks, I don't know any PHP so just tried to add comments to an empty PHP file and got HTML ones and said "Oh!! the OP on the ML is right".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants