Skip to content

Commit

Permalink
Merge branch 'tabatha/dnt-new-lines-2' of github.com:newrelic/docs-we…
Browse files Browse the repository at this point in the history
…bsite into tabatha/dnt-new-lines-2
  • Loading branch information
tabathadelane committed Mar 29, 2024
2 parents 24c4ffc + 255df74 commit 20a2260
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions scripts/actions/utils/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ module.exports = {
}),
},
import: {
deserialize: (h, node) => {
deserialize: (_state, node) => {
const value = Buffer.from(node.properties.dataValue, 'base64').toString();

return h(node, 'import', value);
return {
type: 'import',
value,
};
},
serialize: (h, node) =>
h(node, 'div', {
Expand All @@ -38,7 +41,7 @@ module.exports = {
}),
},
frontmatter: {
deserialize: (state, node) => {
deserialize: (_state, node) => {
const data = deserializeJSValue(node.properties.dataValue);
const frontMatterAtt = node.children.reduce((acc, child) => {
const key = child.properties.dataKey;
Expand Down Expand Up @@ -135,11 +138,11 @@ module.exports = {
serialize: serializeComponent,
},
InlinePopover: {
deserialize: (h, node) => {
deserialize: (state, node) => {
// this is to remove the `span`'s children to make this
// a self closing tag.
node.children = [];
return deserializeComponent(h, node, { tagName: 'InlinePopover' });
return deserializeComponent(state, node, { tagName: 'InlinePopover' });
},
// serialize: serializeComponent,
serialize: (h, node) =>
Expand All @@ -157,8 +160,8 @@ module.exports = {
serialize: serializeComponent,
},
Icon: {
deserialize: (h, node) =>
deserializeComponent(h, node, { hasChildrenProp: false }),
deserialize: (state, node) =>
deserializeComponent(state, node, { hasChildrenProp: false }),
serialize: (h, node) =>
serializeComponent(h, node, {
wrapChildren: false,
Expand Down

0 comments on commit 20a2260

Please sign in to comment.