Skip to content

Conversation

@sjstyle
Copy link
Contributor

@sjstyle sjstyle commented Apr 20, 2017

This pull request fixes CodePane render bug when using markdown syntax.

Sample presentation code

Note : I attached Presentation class without import clause. You can paste and run this code at example/index.js.

export default class Presentation extends React.Component {
  render() {
    return (
      <Deck transition={["zoom", "slide"]} theme={theme} transitionDuration={500}>
        <Slide transition={["zoom"]} bgColor="white">
          <Markdown>
              {`
  ## CodePane
---

  \`\`\`
  console.log("Hello world!");
  \`\`\`
            `}
          </Markdown>
        </Slide>
      </Deck>
    );
  }
}

At current master branch )

image

After fixes branch )

image

This happens because CodePane needs source with props.source or children, but marked.js (markdown renderer) returns code property to implement them.

I fix additional function by changing property code to source, so we don't modify CodePane nor marked.js source.

@sjstyle sjstyle force-pushed the fix-markdown-codepane branch from 700e055 to 7d60c65 Compare April 20, 2017 10:38
@mAAdhaTTah
Copy link
Contributor

This should fix #329.

@kenwheeler
Copy link
Contributor

Can you rebase this to use the latest markdown style on master?

@mAAdhaTTah
Copy link
Contributor

mAAdhaTTah commented Jul 1, 2017

@kenwheeler @sjstyle I integrated the above changes + changes to Code for the Markdown component but I'm getting a new error in my code. See here: mAAdhaTTah@a71765c

Edit: Actually, this may be unrelated.

@sjstyle
Copy link
Contributor Author

sjstyle commented Jul 2, 2017

I noticed that this issue was solved by other commits. So I will close this pull request.

@sjstyle sjstyle closed this Jul 2, 2017
@sjstyle
Copy link
Contributor Author

sjstyle commented Jul 2, 2017

@mAAdhaTTah @kenwheeler
I opened another pull request #338, which relates 329 issue.

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.

3 participants