Skip to content

Commit

Permalink
Remove the bom for the string and the buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
akshita31 committed Sep 19, 2018
1 parent 342a5b4 commit 454f43c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/omnisharp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import CompositeDisposable from '../CompositeDisposable';
import Disposable from '../Disposable';
import OptionProvider from '../observers/OptionProvider';
import { IMonoResolver } from '../constants/IMonoResolver';
import * as removeBom from "remove-bom-buffer";
const removeBomBuffer = require("remove-bom-buffer");
const removeBomString = require("strip-bom");

enum ServerState {
Starting,
Expand Down Expand Up @@ -517,7 +518,7 @@ export class OmniSharpServer {
private async _doConnect(options: Options): Promise<void> {

this._serverProcess.stderr.on('data', (data: Buffer) => {
let trimData = removeBom.remove(data);
let trimData = <Buffer>removeBomBuffer(data);
if (trimData.length > 0) {
this._fireEvent(Events.StdErr, trimData.toString());
}
Expand Down Expand Up @@ -567,6 +568,7 @@ export class OmniSharpServer {
}

private _onLineReceived(line: string) {
line = removeBomString(line);
line = line.trim();

if (line[0] !== '{') {
Expand Down
3 changes: 0 additions & 3 deletions typings/remove-bom-buffer.d.ts

This file was deleted.

0 comments on commit 454f43c

Please sign in to comment.