Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Conversation

@andrewfan
Copy link

fixes for #96

@andrewfan andrewfan force-pushed the remove-styles-before-code branch from a49be6d to aa7a23d Compare June 25, 2018 13:48
// do not modify the text if it is inside code style
const hasCodeStyle = currentInlineStyle.find(style => style === "CODE");
if (hasCodeStyle) {
return editorState;
Copy link

Choose a reason for hiding this comment

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

I see where you were going with this, but it might be less edge casey to filter all the text that's styled as inline code so it doesn't apply to the other inline style calculations maybe? Thoughts?

#96 (comment)

Copy link

Choose a reason for hiding this comment

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

I.e. instead of just ignoring this text that should be italic (which I think would happen rn?)

this is `some _code` and some more _text_

we could just remove the inline code bit and everything before it and pretend that the text is

 and some more _text_

Does that make sense or am I way overcomplicating things?

Copy link

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

This is great, thanks so much!

@mxstbr mxstbr merged commit 77cafda into withspectrum:master Jul 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants