Skip to content

Commit

Permalink
Merge pull request #259 from jaredwray/upgrading-docula-to-0.5.2
Browse files Browse the repository at this point in the history
upgrading docula to 0.5.2
  • Loading branch information
jaredwray committed Mar 30, 2024
2 parents b872274 + 2c667c8 commit 3929763
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const markdown = `# Hello World ::-):\n\n This is a test.`;
const html = writr.renderSync(markdown); // <h1>Hello World 🙂</h1><p>This is a test.</p>
```

### '.renderReact(markdown: string, options?: RenderOptions, reactOptions?: HTMLReactParserOptions): Promise<React.JSX.Element>'
### '.renderReact(markdown: string, options?: RenderOptions, reactOptions?: HTMLReactParserOptions): Promise<React.JSX.Element />'

Rendering markdown to React. The options are based on RenderOptions and now HTMLReactParserOptions from `html-react-parser`.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@types/node": "^20.12.2",
"@types/react": "^18.2.73",
"@vitest/coverage-v8": "^1.4.0",
"docula": "^0.4.0",
"docula": "^0.5.2",
"rimraf": "^5.0.5",
"typescript": "^5.4.3",
"vitest": "^1.4.0",
Expand Down
6 changes: 3 additions & 3 deletions site/docula.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fs = require('fs-extra');
const fs = require('fs');
const path = require('path');
const process = require('node:process');

Expand All @@ -12,8 +12,8 @@ module.exports.options = {
module.exports.onPrepare = async (config) => {
const readmePath = path.join(process.cwd(), './README.md');
const readmeSitePath = path.join(config.sitePath, 'README.md');
const readme = await fs.readFile(readmePath, 'utf8');
const readme = await fs.promises.readFile(readmePath, 'utf8');
const updatedReadme = readme.replace('![Writr](site/logo.svg)\n\n---\n\n', '');
console.log('writing updated readme to ', readmeSitePath);
await fs.writeFile(readmeSitePath, updatedReadme);
await fs.promises.writeFile(readmeSitePath, updatedReadme);
}

0 comments on commit 3929763

Please sign in to comment.