prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
18 lines (17 loc) • 799 B
JavaScript
import { s as languageMap } from "../core-E7btWBqK.js";
import { S as voidTags, n as getClosestToken } from "../utils-BffvWiz1.js";
import { d as xmlOpeningTag, i as clikeComment, n as autoCloseTags, o as htmlAutoIndent, s as markupComment } from "../shared-CMfzVEi9.js";
//#region src/languages/php.ts
languageMap.php = {
comments: clikeComment,
getComments: (editor, position) => {
if (getClosestToken(editor, ".php", 0, 0, position)) return clikeComment;
return markupComment;
},
autoIndent: htmlAutoIndent(xmlOpeningTag, voidTags),
autoCloseTags: ([start, end], value, editor) => {
return !value.includes("<?") || getClosestToken(editor, ".php", 0, 0, start) ? "" : autoCloseTags(editor, start, end, value, xmlOpeningTag, voidTags);
}
};
//#endregion
//# sourceMappingURL=php.js.map