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

Markdown 代码解析中增加行高亮功能 #9

Open
minwe opened this issue Dec 19, 2014 · 1 comment
Open

Markdown 代码解析中增加行高亮功能 #9

minwe opened this issue Dec 19, 2014 · 1 comment

Comments

@minwe
Copy link
Owner

minwe commented Dec 19, 2014

React docs 的是实现方式:
https://github.com/Minwe/react/blob/master/docs/_plugins/highlight_lines.rb

使用方法:````html{6,10}`

```html{6,10}
<!DOCTYPE html>
<html>
  <head>
    <title>Hello React!</title>
    <script src="build/react.js"></script>
    <!-- No need for JSXTransformer! -->
  </head>
  <body>
    <div id="example"></div>
    <script src="build/helloworld.js"></script>
  </body>
</html>


```javascript{4-10,13}
// tutorial10.js
var CommentList = React.createClass({
  render: function() {
    var commentNodes = this.props.data.map(function (comment) {
      return (
        <Comment author={comment.author}>
          {comment.text}
        </Comment>
      );
    });
    return (
      <div className="commentList">
        {commentNodes}
      </div>
    );
  }
});
@minwe
Copy link
Owner Author

minwe commented Jul 7, 2015

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

No branches or pull requests

1 participant