Skip to content

Commit

Permalink
Normalize windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
xt0rted committed Feb 4, 2015
1 parent 10234a5 commit 916615d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/language/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ module Lint {
var path = require("path");

export function getSourceFile(fileName: string, source: string): ts.SourceFile {
var normalizedName = path.normalize(fileName.replace(/\\/g, "/"));
var normalizedName = path.normalize(fileName).replace(/\\/g, "/");
var compilerOptions = createCompilerOptions();

var compilerHost = {
getSourceFile: function(filenameToGet: string) {
if (filenameToGet === fileName) {
getSourceFile: function (filenameToGet: string) {
if (filenameToGet === normalizedName) {
return ts.createSourceFile(filenameToGet, source, compilerOptions.target, "1", true);
}
},
Expand Down

0 comments on commit 916615d

Please sign in to comment.