Skip to content

Commit

Permalink
Pass inline prop to block.markdown()
Browse files Browse the repository at this point in the history
  • Loading branch information
caub committed Sep 22, 2022
1 parent c0eb255 commit 7344662
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/wurd-react.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function WurdMarkdown({
block,
id, sid,
type = 'div', component: Component = type,
vars,
vars, inline,
...rest
}) {
block = block || wurd__default["default"].content;

const text = block.markdown(id, vars);
const text = block.markdown(id, vars, { inline });

const elProps = {
...rest,
Expand Down
4 changes: 2 additions & 2 deletions dist/wurd-react.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ function WurdMarkdown({
block,
id, sid,
type = 'div', component: Component = type,
vars,
vars, inline,
...rest
}) {
block = block || wurd.content;

const text = block.markdown(id, vars);
const text = block.markdown(id, vars, { inline });

const elProps = {
...rest,
Expand Down
7 changes: 5 additions & 2 deletions dist/wurd-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@
return /*#__PURE__*/React__default["default"].createElement(Component, elProps, text);
}

var _excluded$3 = ["block", "id", "sid", "type", "component", "vars"];
var _excluded$3 = ["block", "id", "sid", "type", "component", "vars", "inline"];
function WurdMarkdown(_ref) {
var block = _ref.block,
id = _ref.id,
Expand All @@ -740,10 +740,13 @@
_ref$component = _ref.component,
Component = _ref$component === void 0 ? type : _ref$component,
vars = _ref.vars,
inline = _ref.inline,
rest = _objectWithoutProperties(_ref, _excluded$3);

block = block || instance.content;
var text = block.markdown(id, vars);
var text = block.markdown(id, vars, {
inline: inline
});

var elProps = _objectSpread2(_objectSpread2({}, rest), {}, {
dangerouslySetInnerHTML: {
Expand Down
2 changes: 1 addition & 1 deletion dist/wurd-react.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7344662

Please sign in to comment.