Glass.Mapper icon indicating copy to clipboard operation
Glass.Mapper copied to clipboard

RegexViewTypeResolver matches type-string with carriage return char

Open philne opened this issue 8 years ago • 1 comments

The regular expression in Glass.Mapper.Sc.Pipelines.Response.RegexViewType.RegexViewTypeResolver matches the type-string including the carriage return char.

E.g.: The first match for the View-string: "@using Sitecore.Mvc.Analytics.Extensions\r\n@model My.Internet.Web.Models.GlassMapper.sitecore.templates.My.Pages.IContentPageModel\r\n@*/ will be "My.Internet.Web.Models.GlassMapper.sitecore.templates.My.Pages.IContentPageModel\r" instead of "My.Internet.Web.Models.GlassMapper.sitecore.templates.My.Pages.IContentPageModel"

It seems that the newline chars in the unit-tests are not in the right order: https://github.com/mikeedwards83/Glass.Mapper/blob/master/Tests/Unit%20Tests/Glass.Mapper.Sc.Mvc.Tests/RegexTypeFinderFixture.cs

philne avatar Dec 20 '16 18:12 philne

Hi this should be fixed in 4.3.2.195

mikeedwards83 avatar Dec 20 '16 20:12 mikeedwards83