дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(editor): highlight JSP pages (#937)
JSP files had no highlighting and showed a `?` icon; the HTML mode left directives, scriptlets, JSP comments and EL as plain text and flagged `<c:out/>` / `<jsp:include/>` as unclosed elements. - A JSP grammar layer (comments, directives, scriptlets, expressions, declarations, EL) with HTML and Java overlays, so markup split by JSP elements still nests and braces match across scriptlets. - EL as its own grammar top: member/index/method calls, namespaced functions, keyword operators, ternaries, lambdas and collection literals. - Block comments use `<%-- --%>` in markup and `//` in scriptlets; JSP comments and scriptlets fold. - `.jsp .jspf .jspx .jsph .tag .tagf .tagx` map to the JSP language with a file icon; `gen:jsp-grammar` regenerates the parser and a test checks it matches the grammar. Closes #870. Co-authored-by: jaw52 <[email protected]>
Цей коміт міститься в:
19 files changed
+764
-4
No files matched your search
@@ -172,6 +172,9 @@ describe("fileIconName", () => {
|
||||
["main.dart", "file-dart"],
|
||||
["App.vue", "file-vue"],
|
||||
["App.svelte", "file-svelte"],
|
||||
["index.jsp", "file-jsp"],
|
||||
["footer.jspf", "file-jsp"],
|
||||
["card.tag", "file-jsp"],
|
||||
["styles.scss", "file-scss"],
|
||||
["styles.sass", "file-sass"],
|
||||
["styles.less", "file-less"],
|
||||
|
||||
@@ -76,6 +76,7 @@ const ICONS = {
|
||||
"file-npm": "openidea/fileTypes/npm",
|
||||
"file-vue": "fileTypes/vue",
|
||||
"file-svelte": "openidea/fileTypes/svelte",
|
||||
"file-jsp": "openidea/fileTypes/jsp",
|
||||
"file-yaml": "fileTypes/yaml",
|
||||
"file-toml": "fileTypes/toml",
|
||||
"file-html": "fileTypes/html",
|
||||
@@ -822,6 +823,7 @@ const EXT_ICONS = table({
|
||||
"file-tsx": "tsx",
|
||||
"file-vue": "vue",
|
||||
"file-svelte": "svelte",
|
||||
"file-jsp": "jsp jspx jspf jsph tag tagf tagx",
|
||||
"file-json": "json jsonc json5 jsonl ndjson geojson topojson webmanifest har avsc code-workspace code-snippets map",
|
||||
"file-md": "md mdx markdown mdown mkd mkdn mdwn ronn workbook",
|
||||
"file-rst": "rst",
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 4C14 2.89543 13.1046 2 12 2H4C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4Z" fill="#E76F00"/>
|
||||
<path d="M4.5 5.5L3 8L4.5 10.5M11.5 5.5L13 8L11.5 10.5M9 5.5L7 10.5" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Після Ширина: | Висота: | Розмір: 384 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 4C14 2.89543 13.1046 2 12 2H4C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4Z" fill="#F0883E"/>
|
||||
<path d="M4.5 5.5L3 8L4.5 10.5M11.5 5.5L13 8L11.5 10.5M9 5.5L7 10.5" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Після Ширина: | Висота: | Розмір: 384 B |
Reference in new issue
Заблокувати користувача