Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit658593c

Browse files
committed
Adds PHP tag only when code does not start with<
1 parentab4fddf commit658593c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎ob-phpstan.el‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
(defunorg-babel-execute:phpstan (bodyparams)
5050
"Org mode fish evaluate function"
5151
(let ((tmp-file (org-babel-temp-file"phpstan-"".php"))
52-
(body (concat"<?php\n" body))
52+
(body (if (string-prefix-p"<" body)
53+
body
54+
(concat"<?php" body)))
5355
(level (or (cdr (assoc:level params)) org-babel-phpstan-level)))
5456
(with-temp-file tmp-file (insert (org-babel-expand-body:generic body params)))
5557
(org-babel-eval (format"%s analyze%s --level%s --no-progress"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp