mirror of
https://github.com/marktext/marktext.git
synced 2025-05-08 03:30:52 +08:00

* Fix tests and improve CI * Add xvfb to Linux - still problems with Mocha e2e tests * Disable Webpack Bundle Analyzer for testing * Use preinstalled yarn application on AppVeyor * Fix build failure with latest vue version * Remove "markdown-toc" * Fix application title unit test * Hide electron window during unit tests * Add basic muya unit tests * Dirty markdown-toc replacement * Update dependencies * Update eslint packages and configuration
55 lines
1.3 KiB
JavaScript
55 lines
1.3 KiB
JavaScript
import fs from 'fs'
|
|
import path from 'path'
|
|
|
|
const loadMarkdownContent = pathname => {
|
|
return fs.readFileSync(path.resolve('test/unit/data', pathname), 'utf-8')
|
|
}
|
|
|
|
export const BasicTextFormattingTemplate = () => {
|
|
return loadMarkdownContent('common/BasicTextFormatting.md')
|
|
}
|
|
|
|
export const BlockquotesTemplate= () => {
|
|
return loadMarkdownContent('common/Blockquotes.md')
|
|
}
|
|
|
|
export const CodeBlocksTemplate = () => {
|
|
return loadMarkdownContent('common/CodeBlocks.md')
|
|
}
|
|
|
|
export const EscapesTemplate = () => {
|
|
return loadMarkdownContent('common/Escapes.md')
|
|
}
|
|
|
|
export const HeadingsTemplate = () => {
|
|
return loadMarkdownContent('common/Headings.md')
|
|
}
|
|
|
|
export const ImagesTemplate = () => {
|
|
return loadMarkdownContent('common/Images.md')
|
|
}
|
|
|
|
export const LinksTemplate = () => {
|
|
return loadMarkdownContent('common/Links.md')
|
|
}
|
|
|
|
export const ListsTemplate = () => {
|
|
return loadMarkdownContent('common/Lists.md')
|
|
}
|
|
|
|
// --------------------------------------------------------
|
|
// GFM templates
|
|
//
|
|
|
|
export const GfmBasicTextFormattingTemplate = () => {
|
|
return loadMarkdownContent('gfm/BasicTextFormatting.md')
|
|
}
|
|
|
|
export const GfmListsTemplate = () => {
|
|
return loadMarkdownContent('gfm/Lists.md')
|
|
}
|
|
|
|
export const GfmTablesTemplate = () => {
|
|
return loadMarkdownContent('gfm/Tables.md')
|
|
}
|