-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(prose): newline characters not displaying properly #717
fix(prose): newline characters not displaying properly #717
Conversation
…amics#619) The MarkupMultine method is used instead of the Markuline in the getTextSegment method because this is where we handle prose part. However, this method add an empty line at the begining which does not align well with the placeholder label. This empty line should be remove.
I updated the title and body to better fit conventional commits. Before committing, also be sure to run |
Your branch is up to date with 'fork/mpemy/display-remove-control-elements'. Changes to be committed: modified: src/components/OSCALControlProse.js Fixing the failing build due to linting issue. The line of code that was causing this issue have been addressed. There was method MarkupLines that was added and then removed because it was not needed I just forgot to delete it that is why lint was failing because I was importing a component that was not used and was inexistent. I have simply deleted that reference.
…emy/oscal-react-library into mpemy/display-remove-control-elements merging these two branches so that I can complete this commit and fix the failing build
… symbol is contains in json prose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just handle this in getTextSegment
itself?
function getTextSegment(text, key) {
if (!text) {
return null;
}
return (
<Typography component="span" key={key}>
{
text.includes("\n") ?
<OSCALMarkupMultiline>{text}</OSCALMarkupMultiline> :
<OSCALMarkupLine>{text}</OSCALMarkupLine>
}
</Typography>
);
}
Thanks Kyle, I will do, I will handle that logic in getTextSegment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this!!
The MarkupMultine method is used instead of the Markuline in the getTextSegment method because this is where we handle prose part. However, this method add an empty line at the begining which does not align well with the placeholder label. This empty line should be remove.
Just address a typo that was mistakenly inserted in the last commit.
closes #619