chore: remove old parser

This commit is contained in:
Oliver Eyton-Williams
2021-02-01 19:31:39 +01:00
committed by Mrugesh Mohapatra
parent e3511f2930
commit a3a678b7af
139 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,85 @@
# --description--
Paragraph 1
```html
code example
```
# --instructions--
Paragraph 0
```html
code example 0
```
# --hints--
First hint
```js
// test code
```
Second hint with <code>code</code>
```js
// more test code
```
Third *hint* with <code>code</code> and `inline code`
```js
// more test code
if(let x of xs) {
console.log(x);
}
```
# --seed--
## --seed-contents--
```html
<html>
<body>
</body>
</html>
```
![key-for-css]()
```css
body {
background: green;
}
```
![key-for-js]()
```js
var x = 'y';
```
# --solutions--
![html-key]()
```html
<html>
<body>
</body>
</html>
```
```css
body {
background: white;
}
```
```js
var x = 'y';
``

View File

@@ -0,0 +1,10 @@
const { inspect } = require('util');
const path = require('path');
const { parsemd } = require('../index');
(async () => {
const fullPath = path.resolve(__dirname, '../__fixtures__/realistic.md');
const output = await parsemd(fullPath);
console.log(inspect(output, null, null, true));
})();

View File

@@ -0,0 +1,14 @@
const { read } = require('to-vfile');
const remark = require('remark');
const directive = require('remark-directive');
const frontmatter = require('remark-frontmatter');
(async () => {
const path = './example.md';
const file = await read(path);
await remark()
.use(directive)
.use(frontmatter, ['yaml'])
.use(() => tree => console.log(JSON.stringify(tree)))
.process(file);
})();

View File

@@ -0,0 +1,13 @@
const { read } = require('to-vfile');
const remark = require('remark');
const html = require('remark-html');
const { inspect } = require('util');
(async () => {
const path = './example.md';
const file = await read(path);
await remark()
.use(() => tree => console.log(inspect(tree, null, null, true)))
.use(html)
.process(file);
})();

View File

@@ -0,0 +1,12 @@
const { read } = require('to-vfile');
const remark = require('remark');
const html = require('remark-html');
(async () => {
const path = './example.md';
const file = await read(path);
const contents = await remark()
.use(html)
.process(file);
console.log(contents);
})();