remark-loader
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="0.3.1"></a> | ||
## [0.3.1](https://github.com/skipjack/remark-loader/compare/v0.3.0...v0.3.1) (2018-01-24) | ||
### Bug Fixes | ||
* allow specified `template` to receive any higher-level `props` ([b365efa](https://github.com/skipjack/remark-loader/commit/b365efa)) | ||
* use ES6 module syntax for the output modules ([d550fa4](https://github.com/skipjack/remark-loader/commit/d550fa4)) | ||
<a name="0.3.0"></a> | ||
@@ -7,0 +18,0 @@ # [0.3.0](https://github.com/skipjack/remark-loader/compare/v0.2.3...v0.3.0) (2017-08-10) |
{ | ||
"name": "remark-loader", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Load markdown through remark with some react-specific features.", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
@@ -17,3 +17,3 @@ /** | ||
jsx = jsx.replace(/<p>(<[A-Z][\s\S]*?)<\/p>/g, '$1') // Remove surrounding p tags from components | ||
jsx = jsx.replace('module.exports = ', '') // Remove lead-in from html-loader | ||
jsx = jsx.replace('export default ', '') // Remove lead-in from html-loader | ||
jsx = jsx.slice(1, jsx.length - 2) // Remove quotes from around JSX | ||
@@ -58,3 +58,4 @@ jsx = jsx.replace(/\\"" \+ (require\(".+?"\)) \+ "\\"/g, '{ $1 }') // Wrap html-loader `require`s | ||
export default props => ( | ||
<Template | ||
<Template | ||
{ ...props } | ||
attributes={ ${JSON.stringify(resolved.attributes)} } | ||
@@ -61,0 +62,0 @@ markdown={ Markdown } /> |
@@ -18,3 +18,3 @@ const Utils = require('loader-utils') | ||
.then(processed => Object.assign({}, processed, { | ||
content: HTMLLoader(processed.content) | ||
content: HTMLLoader(processed.content).replace('module.exports = ', 'export default ') | ||
})) | ||
@@ -21,0 +21,0 @@ // TODO: Ideally this should be enabled via remark-react or another plugin (discuss with the author) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12975
118
9