Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const process = require('process');
const eol = require('eol');
const reactDocgen = require('react-docgen');
const ReactDocGenMarkdownRenderer = require('react-docgen-markdown-renderer');

Expand Down Expand Up @@ -83,7 +84,7 @@ ReactDocGenPlugin.prototype.apply = function (compiler) {
const assetName = path.join(self.options.outputPath, loaded[file].componentName + renderer.extension);

// Render the documentation for the current component
const componentDocumentation = renderer.render(file, loaded[file], composesASTs);
const componentDocumentation = eol.auto(renderer.render(file, loaded[file], composesASTs));

// Add the documentation file to the compilation assets
compilation.assets[assetName] = getDocumentationAsset(componentDocumentation);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"author": "Ori Riner",
"license": "ISC",
"dependencies": {
"eol": "^0.9.1",
"handlebars": "4.0.6",
"react-docgen": "2.14.0",
"react-docgen-markdown-renderer": "1.0.1"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An update is pending. Basically PR OriR/react-docgen-markdown-renderer#6 needs to be merged first.

Expand Down