| Index: Source/devtools/front_end/SourceFrame.js
|
| diff --git a/Source/devtools/front_end/SourceFrame.js b/Source/devtools/front_end/SourceFrame.js
|
| index 659825c0ac42bc1c2bf765fa32f5e56e0ed3f011..873121baad6a5029b5852b21c638afb7589a2773 100644
|
| --- a/Source/devtools/front_end/SourceFrame.js
|
| +++ b/Source/devtools/front_end/SourceFrame.js
|
| @@ -343,7 +343,13 @@ WebInspector.SourceFrame.prototype = {
|
| } else
|
| this._textEditor.editRange(this._textEditor.range(), content || "");
|
|
|
| - this._textEditor.mimeType = this._simplifyMimeType(mimeType);
|
| + mimeType = this._simplifyMimeType(mimeType);
|
| +
|
| + // A hack around the fact that files with "php" extension might be either standalone or html embedded php scripts.
|
| + if (mimeType === "text/x-php" && content.match(/\<\?.*\?\>/gi))
|
| + mimeType = "application/x-httpd-php";
|
| +
|
| + this._textEditor.mimeType = mimeType;
|
|
|
| this._textEditor.beginUpdates();
|
|
|
|
|