Skip to content
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

changed markdown parser #809

Merged
merged 1 commit into from
Apr 12, 2018
Merged

changed markdown parser #809

merged 1 commit into from
Apr 12, 2018

Conversation

mgiraldo
Copy link
Contributor

this and most future fixes will collide with #803 so it is preferrable to merge that branch sooner rather than later

now using react-markdown for all markdown needs... also allows us to do custom link rendering for issues like #783

fixes #523

title: breadcrumb.title
? markdownit.renderInline(breadcrumb.title)
: UNTITLED_TEXT
title: breadcrumb.title ? breadcrumb.title : UNTITLED_TEXT
Copy link
Contributor

Choose a reason for hiding this comment

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

Just sanity checking - you don't want rendered markdown in breadcrumbs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm passing the title as-is and markdownifying it in the breadcrumbs module

<ReactMarkdown
source={
teachingGuide.hasPart.find(item => item.name === "Questions")
.text
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you want to allow for emphasis here?

"/primary-source-sets/"
)
)
}}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you want to allow emphasis in the above ReactMarkdown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes and it is because all types are allowed by default. emphasis is specified in the cases where we only want emphasis to show up

source={
teachingGuide.hasPart.find(item => item.name === "Activity")
.text
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Allow for emphasis?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see above

set.hasPart.find(item => item.name === "Resources").text
)
}}
source={set.hasPart.find(item => item.name === "Resources").text}
Copy link
Contributor

Choose a reason for hiding this comment

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

allow for emphasis?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see above

@mgiraldo mgiraldo merged commit 489e711 into master Apr 12, 2018
@mgiraldo mgiraldo deleted the fix-523 branch April 12, 2018 19:50
@mgiraldo mgiraldo removed the review label Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change markdown renderer to a React-friendly library (DT-1818)
2 participants