Microsoft/monaco-editor

PHP: support for code snippets without the starting `<?php` token

Open

#1,658 opened on Nov 5, 2019

View on GitHub
 (4 comments) (3 reactions) (0 assignees)JavaScript (1,283 forks)batch import
feature-requestgrammarshelp wanted

Repository metrics

Stars
 (14,836 stars)
PR merge metrics
 (Avg merge 6h 26m) (15 merged PRs in 30d)

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