prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
17 lines (16 loc) • 773 B
JavaScript
import { l as languageMap } from "../index-Bb4AMnd0.js";
import { f as getClosestToken } from "../index-2teoWRgh.js";
import { c as clikeComment, d as markupComment, h as htmlAutoIndent, e as autoCloseTags, v as voidTags, x as xmlOpeningTag } from "../index-BVM7eCVX.js";
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);
}
};
//# sourceMappingURL=php.js.map