From c50417fb36818d2637063961e0b03b58207e1209 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 20 Dec 2016 10:11:34 +0100 Subject: [PATCH] Improve markdown sample --- test/samples-all.generated.js | 2 +- test/samples/sample.markdown.txt | 29 ++++++++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/test/samples-all.generated.js b/test/samples-all.generated.js index b7347d4e..bd1188ba 100644 --- a/test/samples-all.generated.js +++ b/test/samples-all.generated.js @@ -126,7 +126,7 @@ define([], function() { return[ }, { "name": "sample.markdown.txt", - "content": "# Header 1 #\r\n## Header 2 ##\r\n### Header 3 ### (Hashes on right are optional)\r\n## Markdown plus h2 with a custom ID ## {#id-goes-here}\r\n[Link back to H2](#id-goes-here)\r\n\r\n\r\n
\r\n
\r\n nested div\r\n
\r\n \r\n This is a div _with_ underscores\r\n and a & bold element.\r\n \r\n
\r\n\r\n* Bullet lists are easy too\r\n- Another one\r\n+ Another one\r\n\r\nThis is a paragraph, which is text surrounded by \r\nwhitespace. Paragraphs can be on one \r\nline (or many), and can drone on for hours. \r\n\r\nNow some inline markup like _italics_, **bold**, \r\nand `code()`. Note that underscores \r\nin_words_are ignored.\r\n\r\n````application/json\r\n { value: [\"or with a mime type\"] }\r\n````\r\n\r\n> Blockquotes are like quoted text in email replies\r\n>> And, they can be nested\r\n\r\n1. A numbered list\r\n2. Which is numbered\r\n3. With periods and a space\r\n\r\nAnd now some code:\r\n\r\n // Code is just text indented a bit\r\n which(is_easy) to_remember();\r\n\r\nAnd a block\r\n\r\n~~~\r\n// Markdown extra adds un-indented code blocks too\r\n\r\nif (this_is_more_code == true && !indented) {\r\n // tild wrapped code blocks, also not indented\r\n}\r\n~~~\r\n\r\nText with \r\ntwo trailing spaces \r\n(on the right) \r\ncan be used \r\nfor things like poems \r\n\r\n### Horizontal rules\r\n\r\n* * * *\r\n****\r\n--------------------------\r\n\r\n![picture alt](/images/photo.jpeg \"Title is optional\") \r\n\r\n## Markdown plus tables ##\r\n\r\n| Header | Header | Right |\r\n| ------ | ------ | -----: |\r\n| Cell | Cell | $10 |\r\n| Cell | Cell | $20 |\r\n\r\n* Outer pipes on tables are optional\r\n* Colon used for alignment (right versus left)\r\n\r\n## Markdown plus definition lists ##\r\n\r\nBottled water\r\n: $ 1.25\r\n: $ 1.55 (Large)\r\n\r\nMilk\r\nPop\r\n: $ 1.75\r\n\r\n* Multiple definitions and terms are possible\r\n* Definitions can include multiple paragraphs too\r\n\r\n*[ABBR]: Markdown plus abbreviations (produces an tag)" + "content": "# Header 1 #\r\n## Header 2 ##\r\n### Header 3 ### (Hashes on right are optional)\r\n## Markdown plus h2 with a custom ID ## {#id-goes-here}\r\n[Link back to H2](#id-goes-here)\r\n\r\n```js\r\nvar x = \"string\";\r\nfunction f() {\r\n return x;\r\n}\r\n```\r\n\r\n\r\n
\r\n
\r\n nested div\r\n
\r\n \r\n This is a div _with_ underscores\r\n and a & bold element.\r\n \r\n
\r\n\r\n* Bullet lists are easy too\r\n- Another one\r\n+ Another one\r\n\r\nThis is a paragraph, which is text surrounded by\r\nwhitespace. Paragraphs can be on one\r\nline (or many), and can drone on for hours.\r\n\r\nNow some inline markup like _italics_, **bold**,\r\nand `code()`. Note that underscores\r\nin_words_are ignored.\r\n\r\n````application/json\r\n { value: [\"or with a mime type\"] }\r\n````\r\n\r\n> Blockquotes are like quoted text in email replies\r\n>> And, they can be nested\r\n\r\n1. A numbered list\r\n2. Which is numbered\r\n3. With periods and a space\r\n\r\nAnd now some code:\r\n\r\n // Code is just text indented a bit\r\n which(is_easy) to_remember();\r\n\r\nAnd a block\r\n\r\n~~~\r\n// Markdown extra adds un-indented code blocks too\r\n\r\nif (this_is_more_code == true && !indented) {\r\n // tild wrapped code blocks, also not indented\r\n}\r\n~~~\r\n\r\nText with\r\ntwo trailing spaces\r\n(on the right)\r\ncan be used\r\nfor things like poems\r\n\r\n### Horizontal rules\r\n\r\n* * * *\r\n****\r\n--------------------------\r\n\r\n![picture alt](/images/photo.jpeg \"Title is optional\")\r\n\r\n## Markdown plus tables ##\r\n\r\n| Header | Header | Right |\r\n| ------ | ------ | -----: |\r\n| Cell | Cell | $10 |\r\n| Cell | Cell | $20 |\r\n\r\n* Outer pipes on tables are optional\r\n* Colon used for alignment (right versus left)\r\n\r\n## Markdown plus definition lists ##\r\n\r\nBottled water\r\n: $ 1.25\r\n: $ 1.55 (Large)\r\n\r\nMilk\r\nPop\r\n: $ 1.75\r\n\r\n* Multiple definitions and terms are possible\r\n* Definitions can include multiple paragraphs too\r\n\r\n*[ABBR]: Markdown plus abbreviations (produces an tag)" }, { "name": "sample.objective-c.txt", diff --git a/test/samples/sample.markdown.txt b/test/samples/sample.markdown.txt index 998c99ef..ea6f2bb1 100644 --- a/test/samples/sample.markdown.txt +++ b/test/samples/sample.markdown.txt @@ -4,6 +4,13 @@ ## Markdown plus h2 with a custom ID ## {#id-goes-here} [Link back to H2](#id-goes-here) +```js +var x = "string"; +function f() { + return x; +} +``` +
@@ -23,12 +30,12 @@ - Another one + Another one -This is a paragraph, which is text surrounded by -whitespace. Paragraphs can be on one -line (or many), and can drone on for hours. +This is a paragraph, which is text surrounded by +whitespace. Paragraphs can be on one +line (or many), and can drone on for hours. -Now some inline markup like _italics_, **bold**, -and `code()`. Note that underscores +Now some inline markup like _italics_, **bold**, +and `code()`. Note that underscores in_words_are ignored. ````application/json @@ -57,11 +64,11 @@ if (this_is_more_code == true && !indented) { } ~~~ -Text with -two trailing spaces -(on the right) -can be used -for things like poems +Text with +two trailing spaces +(on the right) +can be used +for things like poems ### Horizontal rules @@ -69,7 +76,7 @@ for things like poems **** -------------------------- -![picture alt](/images/photo.jpeg "Title is optional") +![picture alt](/images/photo.jpeg "Title is optional") ## Markdown plus tables ##