This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270424 - PHPファイルをフォーマットすると、冒頭の ?>の直前にスペースが挿入される
Summary: PHPファイルをフォーマットすると、冒頭の ?>の直前にスペースが挿入される
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-18 01:10 UTC by seak
Modified: 2017-04-18 01:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDEのログ (184.18 KB, text/plain)
2017-04-18 01:10 UTC, seak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description seak 2017-04-18 01:10:22 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 8.1 version 6.3 running on amd64
Java; VM; Vendor = 1.8.0_101
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.101-b13

再現性: 毎回発生

STEPS:
  * PHPファイルを作成します
  * ファイルの先頭に<?php //comment ?> と書きます
  * フォーマット(Alt + Shift + F)します

ACTUAL:
  「?>」 の直前にスペースが自動で挿入されてしまいます。

フォーマットの度にスペースが挿入されていきます。
(Alt + Shift + F) 
 <?php //comment  ?>
↓
(Alt + Shift + F) 
  <?php //comment   ?>
↓
(Alt + Shift + F) 
  <?php //comment     ?>
 …


なぜか、行を空けると、それ以降のソースはスペースが挿入されません。

---
1: <?php //comment1  ?>
2: <?php //comment2  ?>
3:
4: <?php //comment3  ?>
---

↓フォーマット(Alt + Shift + F)する

---
1: <?php //comment1     ?>
2: <?php //comment2     ?>
3:
4: <?php //comment3  ?>
---

1、2行目の「?>」の直前に、どんどんスペースが挿入されていきます。




EXPECTED:
  「?>」の直前にスペースが挿入されない。
Comment 1 seak 2017-04-18 01:10:27 UTC
Created attachment 164127 [details]
IDEのログ