@@ -55,8 +55,8 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
5555 {
5656 int lineNumber = ast . Extent . StartLineNumber + i ;
5757
58- var start = new ScriptPosition ( fileName , lineNumber , match . Index , line ) ;
59- var end = new ScriptPosition ( fileName , lineNumber , match . Index + match . Length , line ) ;
58+ var start = new ScriptPosition ( fileName , lineNumber , match . Index + 1 , line ) ;
59+ var end = new ScriptPosition ( fileName , lineNumber , match . Index + match . Length + 1 , line ) ;
6060 var extent = new ScriptExtent ( start , end ) ;
6161 yield return new DiagnosticRecord (
6262 string . Format ( CultureInfo . CurrentCulture , Strings . MisleadingBacktickError ) ,
@@ -75,12 +75,12 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
7575 /// <param name="cmdAst"></param>
7676 /// <returns>Returns a list of suggested corrections</returns>
7777 private List < CorrectionExtent > GetCorrectionExtent ( IScriptExtent violationExtent )
78- {
78+ {
7979 var corrections = new List < CorrectionExtent > ( ) ;
8080 corrections . Add ( new CorrectionExtent (
81- violationExtent . StartLineNumber ,
81+ violationExtent . StartLineNumber ,
8282 violationExtent . EndLineNumber ,
83- violationExtent . StartColumnNumber ,
83+ violationExtent . StartColumnNumber + 1 ,
8484 violationExtent . EndColumnNumber ,
8585 String . Empty ,
8686 violationExtent . File ) ) ;
0 commit comments