Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Razor/TagHelper errors are inconsistent #386

@NTaylorMullen

Description

@NTaylorMullen

Right now when editing TagHelpers you'll get an inconsistent error experience. For example if you have the following code in a project which is using Microsoft.AspNet.Mvc.TagHelpers:

<a
<form asp-anti-forgery=""></form>

You'll get 2 TagHelper errors for <a starting at 0,0 with Length 1 referring to its malformed state. You'll then get another TagHelper error for asp-anti-forgery at line 1, character index 6 with length 16 (not length 1).

Another example of this is having an empty document with just @. You'll get a line 0, char index 1, length 1 (length 1 is past the end of the document). Ideally we should have a 0 length here.

We should make the transition to always specify the length of the error. When TagHelpers were initially being created the length was never set so we ended up with some oddities on the TagHelper end and more specifically for older Razor bits the errors are haphazard in when length is specified.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions