diff --git a/data/fixtures/scopes/html/string.singleLine.scope b/data/fixtures/scopes/html/string.singleLine.scope new file mode 100644 index 0000000000..d8863c28b1 --- /dev/null +++ b/data/fixtures/scopes/html/string.singleLine.scope @@ -0,0 +1,10 @@ +
+--- + +[Content] = +[Removal] = +[Domain] = 0:8-0:12 + >----< +0|
+ +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/html/textFragment.comment.block.scope b/data/fixtures/scopes/html/textFragment.comment.block.scope new file mode 100644 index 0000000000..7959bbcea0 --- /dev/null +++ b/data/fixtures/scopes/html/textFragment.comment.block.scope @@ -0,0 +1,15 @@ + +--- + +[Content] = +[Removal] = +[Domain] = 0:0-2:3 + >---- +0| + ---< + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/html/textFragment.element.scope b/data/fixtures/scopes/html/textFragment.element.scope new file mode 100644 index 0000000000..5953d76ab8 --- /dev/null +++ b/data/fixtures/scopes/html/textFragment.element.scope @@ -0,0 +1,10 @@ +
hello
+--- + +[Content] = +[Removal] = +[Domain] = 0:5-0:10 + >-----< +0|
hello
+ +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/html/textFragment.string.singleLine.scope b/data/fixtures/scopes/html/textFragment.string.singleLine.scope new file mode 100644 index 0000000000..024a3d1c25 --- /dev/null +++ b/data/fixtures/scopes/html/textFragment.string.singleLine.scope @@ -0,0 +1,10 @@ +
+--- + +[Content] = +[Removal] = +[Domain] = 0:9-0:11 + >--< +0|
+ +[Insertion delimiter] = " " diff --git a/packages/common/src/scopeSupportFacets/html.ts b/packages/common/src/scopeSupportFacets/html.ts index 68ae5e7779..47dde0a787 100644 --- a/packages/common/src/scopeSupportFacets/html.ts +++ b/packages/common/src/scopeSupportFacets/html.ts @@ -4,59 +4,156 @@ import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types"; const { supported, notApplicable } = ScopeSupportFacetLevel; export const htmlScopeSupport: LanguageScopeSupportFacetMap = { - element: supported, - tags: supported, - startTag: supported, - endTag: supported, - attribute: supported, - "key.attribute": supported, - "value.attribute": supported, "comment.block": supported, "interior.element": supported, + "key.attribute": supported, + "string.singleLine": supported, + "textFragment.comment.block": supported, + "textFragment.element": supported, + "textFragment.string.singleLine": supported, + "value.attribute": supported, + attribute: supported, + element: supported, + endTag: supported, + startTag: supported, + tags: supported, - "argument.actual": notApplicable, + // Not applicable + + "argument.actual.constructor.iteration": notApplicable, + "argument.actual.constructor": notApplicable, "argument.actual.iteration": notApplicable, - "argument.formal": notApplicable, + "argument.actual.method.iteration": notApplicable, + "argument.actual.method": notApplicable, + "argument.actual": notApplicable, + "argument.formal.constructor.iteration": notApplicable, + "argument.formal.constructor": notApplicable, "argument.formal.iteration": notApplicable, + "argument.formal.method.iteration": notApplicable, + "argument.formal.method": notApplicable, + "argument.formal": notApplicable, + "branch.if.iteration": notApplicable, "branch.if": notApplicable, + "branch.loop": notApplicable, + "branch.switchCase.iteration": notApplicable, "branch.switchCase": notApplicable, + "branch.ternary": notApplicable, + "branch.try.iteration": notApplicable, "branch.try": notApplicable, + "class.iteration.block": notApplicable, + "class.iteration.document": notApplicable, + "className.iteration.block": notApplicable, + "className.iteration.document": notApplicable, + "collectionItem.unenclosed.iteration": notApplicable, + "collectionItem.unenclosed": notApplicable, "comment.line": notApplicable, "condition.doWhile": notApplicable, "condition.for": notApplicable, "condition.if": notApplicable, + "condition.switchCase.iteration": notApplicable, "condition.switchCase": notApplicable, "condition.ternary": notApplicable, "condition.while": notApplicable, "functionCall.constructor": notApplicable, "functionCallee.constructor": notApplicable, + "functionName.constructor": notApplicable, + "functionName.iteration.block": notApplicable, + "functionName.iteration.document": notApplicable, + "functionName.method.iteration.class": notApplicable, + "functionName.method": notApplicable, + "interior.cell": notApplicable, + "interior.class": notApplicable, + "interior.command": notApplicable, + "interior.function": notApplicable, + "interior.if": notApplicable, + "interior.lambda": notApplicable, + "interior.loop": notApplicable, + "interior.resource": notApplicable, + "interior.switchCase": notApplicable, + "interior.ternary": notApplicable, + "interior.try": notApplicable, "key.mapPair.iteration": notApplicable, "key.mapPair": notApplicable, + "name.argument.actual.iteration": notApplicable, + "name.argument.actual": notApplicable, + "name.argument.formal.constructor.iteration": notApplicable, + "name.argument.formal.constructor": notApplicable, + "name.argument.formal.iteration": notApplicable, + "name.argument.formal.method.iteration": notApplicable, + "name.argument.formal.method": notApplicable, + "name.argument.formal": notApplicable, + "name.assignment.pattern": notApplicable, "name.assignment": notApplicable, "name.class": notApplicable, + "name.constructor": notApplicable, "name.field": notApplicable, "name.foreach": notApplicable, "name.function": notApplicable, + "name.iteration.block": notApplicable, + "name.iteration.document": notApplicable, + "name.method": notApplicable, + "name.resource.iteration": notApplicable, + "name.resource": notApplicable, + "name.variable.pattern": notApplicable, + "name.variable": notApplicable, + "namedFunction.constructor": notApplicable, + "namedFunction.iteration.block": notApplicable, + "namedFunction.iteration.document": notApplicable, + "namedFunction.method.iteration.class": notApplicable, "namedFunction.method": notApplicable, + "section.iteration.document": notApplicable, + "section.iteration.parent": notApplicable, + "statement.class": notApplicable, + "statement.iteration.block": notApplicable, + "statement.iteration.document": notApplicable, "string.multiLine": notApplicable, - "string.singleLine": notApplicable, - "type.variable": notApplicable, + "textFragment.comment.line": notApplicable, + "textFragment.string.multiLine": notApplicable, + "type.alias": notApplicable, + "type.argument.formal.constructor.iteration": notApplicable, + "type.argument.formal.constructor": notApplicable, + "type.argument.formal.iteration": notApplicable, + "type.argument.formal.method.iteration": notApplicable, + "type.argument.formal.method": notApplicable, + "type.argument.formal": notApplicable, + "type.cast": notApplicable, + "type.class": notApplicable, + "type.enum": notApplicable, + "type.field.iteration": notApplicable, "type.field": notApplicable, "type.foreach": notApplicable, - "type.argument.formal": notApplicable, "type.interface": notApplicable, "type.return": notApplicable, + "type.typeArgument.iteration": notApplicable, + "type.typeArgument": notApplicable, + "type.variable": notApplicable, + "value.argument.actual.iteration": notApplicable, + "value.argument.actual": notApplicable, + "value.argument.formal.constructor.iteration": notApplicable, + "value.argument.formal.constructor": notApplicable, + "value.argument.formal.iteration": notApplicable, + "value.argument.formal.method.iteration": notApplicable, + "value.argument.formal.method": notApplicable, + "value.argument.formal": notApplicable, "value.assignment": notApplicable, "value.field": notApplicable, "value.foreach": notApplicable, "value.mapPair.iteration": notApplicable, "value.mapPair": notApplicable, + "value.resource.iteration": notApplicable, + "value.resource": notApplicable, "value.return.lambda": notApplicable, "value.return": notApplicable, + "value.typeAlias": notApplicable, + "value.variable.pattern": notApplicable, + "value.variable": notApplicable, + "value.yield": notApplicable, anonymousFunction: notApplicable, class: notApplicable, className: notApplicable, command: notApplicable, + disqualifyDelimiter: notApplicable, + environment: notApplicable, fieldAccess: notApplicable, functionCall: notApplicable, functionCallee: notApplicable, @@ -65,7 +162,10 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { list: notApplicable, map: notApplicable, namedFunction: notApplicable, + notebookCell: notApplicable, + pairDelimiter: notApplicable, regularExpression: notApplicable, + section: notApplicable, statement: notApplicable, switchStatementSubject: notApplicable, };