You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
910 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.isWindows = void 0;
function _react() {
const data = _interopRequireDefault(require("react"));
_react = function _react() {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// 在windows环境下很多工具都会把换行符lf自动改成crlf
// 为了测试精准需要将换行符转化一下
// https://github.com/cssmagic/blog/issues/22
const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
/**
* Convert Windows crlf to lf (\r\n to \n)
* @param content
*/
exports.isWindows = isWindows;
var _default = content => {
if (typeof content !== 'string') {
return content;
}
return isWindows ? content.replace(/\r/g, '') : content;
};
exports.default = _default;