You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The regex for detecting #endregion in c# code snippet support expects to only have whitespace to the end of the line after #endregion. If there is extra text the #endregion is not detected, resulting in an error.
Functional impact
Documentation build fails.
Minimal repro steps
Create a class with text after the endregion:
#region TestRegion
public class someclass
{
}
#endregion TestRegion
Reference this file in a conceptual document using a code snippet markdown:
Document.CompilePhaseHandler.ConceptualDocumentProcessor.Build.BuildConceptualDocument](articles/intro.md)Tag name TestRegion is not found Web.Documentation C:\Users\tbunyan\Source\Workspaces\Web.Documentation\EXEC
Further technical details
Whilst adding text after an #endregion has no effect, it is not actually prohibited, and so should be allowed for.
Changing the CSharpCodeSnippetCommentEndLineRegex value in Microsoft.DocAsCode.Dfm.TagNameBlockPathQueryOption should alleviate this.
Untested suggestion:
From
@"^\s*#\s*endregion\s*$"
To
@"^\s*#\s*endregion\s?.*$"
The text was updated successfully, but these errors were encountered:
Title
The regex for detecting #endregion in c# code snippet support expects to only have whitespace to the end of the line after #endregion. If there is extra text the #endregion is not detected, resulting in an error.
Functional impact
Documentation build fails.
Minimal repro steps
Expected result
The code snippet is generated as normal.
Actual result
Error occurs and build fails.
Further technical details
Whilst adding text after an #endregion has no effect, it is not actually prohibited, and so should be allowed for.
Changing the CSharpCodeSnippetCommentEndLineRegex value in Microsoft.DocAsCode.Dfm.TagNameBlockPathQueryOption should alleviate this.
Untested suggestion:
From
To
The text was updated successfully, but these errors were encountered: