Skip to content

Instantly share code, notes, and snippets.

@dasl-
Created May 8, 2020 18:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasl-/9ea0d83cd478f36f6c7deaa737480492 to your computer and use it in GitHub Desktop.
Save dasl-/9ea0d83cd478f36f6c7deaa737480492 to your computer and use it in GitHub Desktop.
%YAML 1.2
---
name: PHP
file_extensions:
- php
- php3
- php4
- php5
- php7
- phps
- phpt
- phtml
first_line_match: '^(#!.*[^-]php[0-9]?|<\?php)\b'
scope: embedding.php
contexts:
main:
- match: ''
push: scope:text.html.basic
push:
- meta_scope: meta.embedded.block.php
- meta_content_scope: source.php
- include: php-end-tag-pop
- include: scope:source.php
php-end-tag-pop:
- match: (\?>)(\s*\n)?
captures:
1: punctuation.section.embedded.end.php
2: meta.html-newline-after-php.php
pop: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment