@samitouri / QOS-React-2 / commits / 25ef456b13

add marked source in tutorial doc

update wording of later section no first, no next more on wording

xxin committed Nov 27, 2015 at 18:18 UTC 25ef456b132e389210c289222604bf43d0b3bbcd
1 file changed +3 -17
docs/docs/tutorial.md
+3 -17
@@ -31,7 +31,7 @@ For sake of simplicity, the server we will run uses a `JSON` file as a database.
31
32 ### Getting started
33
34 -For this tutorial, we're going to make it as easy as possible. Included in the server package discussed above is an HTML file which we'll work in. Open up `public/index.html` in your favorite editor. It should look something like this (with perhaps some minor differences, we'll add an additional `<script>` tag later):
34 +For this tutorial, we're going to make it as easy as possible. Included in the server package discussed above is an HTML file which we'll work in. Open up `public/index.html` in your favorite editor. It should look something like this:
35
36 ```html
37 <!-- index.html -->
@@ -44,6 +44,7 @@ For this tutorial, we're going to make it as easy as possible. Included in the s
44 <script src="https://cdnjs.cloudflare.com/ajax/libs/react/{{site.react_version}}/react-dom.js"></script>
45 <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
46 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
47 + <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js"></script>
48 </head>
49 <body>
50 <div id="content"></div>
@@ -221,22 +222,7 @@ Note that we have passed some data from the parent `CommentList` component to th
222
223 Markdown is a simple way to format your text inline. For example, surrounding text with asterisks will make it emphasized.
224
224 -First, add the third-party library **marked** to your application. This is a JavaScript library which takes Markdown text and converts it to raw HTML. This requires a script tag in your head (which we have already included in the React playground):
225 -
226 -```html{9}
227 -<!-- index.html -->
228 -<head>
229 - <meta charset="utf-8" />
230 - <title>React Tutorial</title>
231 - <script src="https://cdnjs.cloudflare.com/ajax/libs/react/{{site.react_version}}/react.js"></script>
232 - <script src="https://cdnjs.cloudflare.com/ajax/libs/react/{{site.react_version}}/react-dom.js"></script>
233 - <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
234 - <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
235 - <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js"></script>
236 -</head>
237 -```
238 -
239 -Next, let's convert the comment text to Markdown and output it:
225 +In this tutorial we use a third-party library **marked** which takes Markdown text and converts it to raw HTML. We already included this library with the original markup for the page, so we can just start using it. Let's convert the comment text to Markdown and output it:
226
227 ```javascript{9}
228 // tutorial6.js