mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Html: fix incorrect HTML lexer behaviour.
GitOrigin-RevId: 3eb230e2be097b4db8c341902434ad4376eacebc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6b8f0d4b52
commit
d5c826aaa2
@@ -318,6 +318,7 @@ public abstract class BaseHtmlLexer extends DelegateLexer {
|
||||
|
||||
protected int skipToTheEndOfTheEmbeddment() {
|
||||
Lexer base = getDelegate();
|
||||
int initialStart = base.getTokenStart();
|
||||
int tokenEnd = base.getTokenEnd();
|
||||
int lastState = 0;
|
||||
int lastStart = 0;
|
||||
@@ -375,8 +376,15 @@ public abstract class BaseHtmlLexer extends DelegateLexer {
|
||||
}
|
||||
}
|
||||
|
||||
base.start(buf,lastStart,getBufferEnd(),lastState);
|
||||
base.getTokenType();
|
||||
if (lastStart < initialStart) {
|
||||
// empty embeddment
|
||||
base.start(buf, initialStart, getBufferEnd(), lastState);
|
||||
TokenHandler tokenHandler = tokenHandlers.get(base.getTokenType());
|
||||
if (tokenHandler != null) tokenHandler.handleElement(this);
|
||||
} else {
|
||||
base.start(buf, lastStart, getBufferEnd(), lastState);
|
||||
base.getTokenType();
|
||||
}
|
||||
} else if (seenAttribute) {
|
||||
while(true) {
|
||||
if (!isValidAttributeValueTokenType(base.getTokenType())) break;
|
||||
|
||||
Reference in New Issue
Block a user