MCPcopy
hub / github.com/marktext/marktext / convertLineEndings

Function convertLineEndings

packages/desktop/src/main/filesystem/markdown.ts:42–44  ·  view source on GitHub ↗
(text: string, lineEnding: LineEnding)

Source from the content-addressed store, hash-verified

40}
41
42const convertLineEndings = (text: string, lineEnding: LineEnding): string => {
43 return text.replace(LINE_ENDING_REG, getLineEnding(lineEnding))
44}
45
46/**
47 * Special function to normalize directory and markdown file paths.

Callers 2

writeMarkdownFileFunction · 0.85
loadMarkdownFileFunction · 0.85

Calls 2

getLineEndingFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected