microsoft / microsoft/monaco-editor
PHP: support for code snippets without the starting `<?php` token
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
monaco-editor version: 0.18.1
Steps or JS usage snippet reproducing the issue:
The following snippet doesn't get highlighted properly because the starting <?php token is missing, I think it should get highlighted better, like GitHub is doing, even though the current behavior is probably overall more correct, but kind of too strict.
public function index() {
$projects = Project::all();
return view('projects.index', compact('projects'));
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named in the issue. Start by reproducing the provided PHP snippet in Monaco 0.18.1 and inspect the PHP syntax-highlighting behavior when the opening token is absent; done means the snippet receives useful highlighting without requiring <?php.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100