tommoor / slate-md-serializer

A Markdown serializer for the Slate editor framework
MIT License
64 stars 36 forks source link

inCodeBlock doesn't actually check for it #16

Closed Lukavyi closed 6 years ago

Lukavyi commented 6 years ago
const inCodeBlock = !!document.getClosest(node.key, n => {
  n.type === "code";
});

The arrow function doesn't return anything, but it should

https://github.com/tommoor/slate-md-serializer/blob/master/src/renderer.js#L201

tommoor commented 6 years ago

Hmm, it does look like you're right although this hasn't caused a problem in practice. Clearly the test needs some work here too.

Lukavyi commented 6 years ago

Seems that it would always equal to false, thus making the inCodeBlock redundant