remarkjs / remark

markdown processor powered by plugins part of the @unifiedjs collective
https://remark.js.org
MIT License
7.66k stars 358 forks source link

BUG: -- is compiled to *** #871

Closed lxfu1 closed 3 years ago

lxfu1 commented 3 years ago

Initial checklist

Affected packages and versions

"version": "13.0.0",

Link to runnable example

No response

Steps to reproduce


const md = `---
title: Introduction
order: 0
redirect_from:
  - /en/docs/manual
---`;

const apiGenerator = (apiPath, filename) => {
  const res = remark()
    // .use(mdprima)
    .use()
    .processSync(md);
  // .processSync(
  //   fs.readFileSync(apiPath, {
  //     encoding: 'utf-8',
  //   }),
  // );
  fs.writeFileSync(writePath, res.contents);
};

Expected behavior

---
title: Introduction
order: 0
redirect_from:
  - /en/docs/manual
---

Actual behavior

***

title: Introduction
order: 0
redirect_from:

*   /en/docs/manual

***

Runtime

Node v14

Package manager

npm v6

OS

macOS

Build and bundle tools

Webpack

wooorm commented 3 years ago

This is not a bug. This is intentional. If you want to support the non-standard markdown extension “frontmatter”, please use remark-frontmatter. If you want to compile to a different thematic break style, you can do so by passing options.

github-actions[bot] commented 3 years ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.