Permalink
Browse files

bumped up 0.2.0

* checks extensions and render flags value.

0.1.0b release only checks specified key exist. Now, it also checks their value.

* added useful methods.

array Sundown\Render\Base::getRenderFlags()
void Sundown\Render\Base::setRenderFlags(array $render_flags)

array Sundown\Markdown::getExtensions()
void Sundown\Markdown::setExtensions(array $extensions)
Sundown\Render\Base Sundown\Markdown::getRender()

[summary]
  * Fix segfault on empty link refs
  * Escape html inside table of contents.
  * hanging whitespace breaks tables
  • Loading branch information...
2 parents a3bfd79 + ee443b0 commit 3f0f1c5723135993f85ff84282b51843d787f10d @chobie committed Feb 21, 2012
Showing with 12,307 additions and 5,086 deletions.
  1. +40 −23 .gitignore
  2. +6 −0 .travis.yml
  3. +13 −0 CREDITS
  4. +68 −15 LICENSE
  5. +216 −44 README.md
  6. +56 −0 Rakefile
  7. +20 −0 config.m4
  8. +6 −0 config.w32
  9. +3 −0 conformance_test/Markdown.php
  10. +4 −0 conformance_test/Markdown.sh
  11. +176 −0 conformance_test/MarkdownTest_1.0.3/MarkdownTest.pl
  12. +17 −0 conformance_test/MarkdownTest_1.0.3/Tests/Amps and angle encoding.html
  13. +21 −0 conformance_test/MarkdownTest_1.0.3/Tests/Amps and angle encoding.text
  14. +18 −0 conformance_test/MarkdownTest_1.0.3/Tests/Auto links.html
  15. +13 −0 conformance_test/MarkdownTest_1.0.3/Tests/Auto links.text
  16. +118 −0 conformance_test/MarkdownTest_1.0.3/Tests/Backslash escapes.html
  17. +120 −0 conformance_test/MarkdownTest_1.0.3/Tests/Backslash escapes.text
  18. +15 −0 conformance_test/MarkdownTest_1.0.3/Tests/Blockquotes with code blocks.html
  19. +11 −0 conformance_test/MarkdownTest_1.0.3/Tests/Blockquotes with code blocks.text
  20. +18 −0 conformance_test/MarkdownTest_1.0.3/Tests/Code Blocks.html
  21. +14 −0 conformance_test/MarkdownTest_1.0.3/Tests/Code Blocks.text
  22. +6 −0 conformance_test/MarkdownTest_1.0.3/Tests/Code Spans.html
  23. +6 −0 conformance_test/MarkdownTest_1.0.3/Tests/Code Spans.text
  24. +8 −0 conformance_test/MarkdownTest_1.0.3/Tests/Hard-wrapped paragraphs with list-like lines.html
  25. +8 −0 conformance_test/MarkdownTest_1.0.3/Tests/Hard-wrapped paragraphs with list-like lines.text
  26. +71 −0 conformance_test/MarkdownTest_1.0.3/Tests/Horizontal rules.html
  27. +67 −0 conformance_test/MarkdownTest_1.0.3/Tests/Horizontal rules.text
  28. +15 −0 conformance_test/MarkdownTest_1.0.3/Tests/Inline HTML (Advanced).html
  29. +15 −0 conformance_test/MarkdownTest_1.0.3/Tests/Inline HTML (Advanced).text
  30. +72 −0 conformance_test/MarkdownTest_1.0.3/Tests/Inline HTML (Simple).html
  31. +69 −0 conformance_test/MarkdownTest_1.0.3/Tests/Inline HTML (Simple).text
  32. +13 −0 conformance_test/MarkdownTest_1.0.3/Tests/Inline HTML comments.html
  33. +13 −0 conformance_test/MarkdownTest_1.0.3/Tests/Inline HTML comments.text
  34. +11 −0 conformance_test/MarkdownTest_1.0.3/Tests/Links, inline style.html
  35. +12 −0 conformance_test/MarkdownTest_1.0.3/Tests/Links, inline style.text
  36. +52 −0 conformance_test/MarkdownTest_1.0.3/Tests/Links, reference style.html
  37. +71 −0 conformance_test/MarkdownTest_1.0.3/Tests/Links, reference style.text
  38. +9 −0 conformance_test/MarkdownTest_1.0.3/Tests/Links, shortcut references.html
  39. +20 −0 conformance_test/MarkdownTest_1.0.3/Tests/Links, shortcut references.text
  40. +3 −0 conformance_test/MarkdownTest_1.0.3/Tests/Literal quotes in titles.html
  41. +7 −0 conformance_test/MarkdownTest_1.0.3/Tests/Literal quotes in titles.text
  42. +314 −0 conformance_test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Basics.html
  43. +306 −0 conformance_test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Basics.text
  44. +942 −0 conformance_test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Syntax.html
  45. +888 −0 conformance_test/MarkdownTest_1.0.3/Tests/Markdown Documentation - Syntax.text
  46. +9 −0 conformance_test/MarkdownTest_1.0.3/Tests/Nested blockquotes.html
  47. +5 −0 conformance_test/MarkdownTest_1.0.3/Tests/Nested blockquotes.text
  48. +148 −0 conformance_test/MarkdownTest_1.0.3/Tests/Ordered and unordered lists.html
  49. +131 −0 conformance_test/MarkdownTest_1.0.3/Tests/Ordered and unordered lists.text
  50. +7 −0 conformance_test/MarkdownTest_1.0.3/Tests/Strong and em together.html
  51. +7 −0 conformance_test/MarkdownTest_1.0.3/Tests/Strong and em together.text
  52. +25 −0 conformance_test/MarkdownTest_1.0.3/Tests/Tabs.html
  53. +21 −0 conformance_test/MarkdownTest_1.0.3/Tests/Tabs.text
  54. +8 −0 conformance_test/MarkdownTest_1.0.3/Tests/Tidyness.html
  55. +5 −0 conformance_test/MarkdownTest_1.0.3/Tests/Tidyness.text
  56. +157 −0 conformance_test/MarkdownTest_1.0/MarkdownTest.pl
  57. +17 −0 conformance_test/MarkdownTest_1.0/Tests/Amps and angle encoding.html
  58. +21 −0 conformance_test/MarkdownTest_1.0/Tests/Amps and angle encoding.text
  59. +18 −0 conformance_test/MarkdownTest_1.0/Tests/Auto links.html
  60. +13 −0 conformance_test/MarkdownTest_1.0/Tests/Auto links.text
  61. +102 −0 conformance_test/MarkdownTest_1.0/Tests/Backslash escapes.html
  62. +104 −0 conformance_test/MarkdownTest_1.0/Tests/Backslash escapes.text
  63. +15 −0 conformance_test/MarkdownTest_1.0/Tests/Blockquotes with code blocks.html
  64. +11 −0 conformance_test/MarkdownTest_1.0/Tests/Blockquotes with code blocks.text
  65. +8 −0 conformance_test/MarkdownTest_1.0/Tests/Hard-wrapped paragraphs with list-like lines.html
  66. +8 −0 conformance_test/MarkdownTest_1.0/Tests/Hard-wrapped paragraphs with list-like lines.text
  67. +71 −0 conformance_test/MarkdownTest_1.0/Tests/Horizontal rules.html
  68. +67 −0 conformance_test/MarkdownTest_1.0/Tests/Horizontal rules.text
  69. +14 −0 conformance_test/MarkdownTest_1.0/Tests/Inline HTML (Advanced).html
  70. +14 −0 conformance_test/MarkdownTest_1.0/Tests/Inline HTML (Advanced).text
  71. +72 −0 conformance_test/MarkdownTest_1.0/Tests/Inline HTML (Simple).html
  72. +69 −0 conformance_test/MarkdownTest_1.0/Tests/Inline HTML (Simple).text
  73. +13 −0 conformance_test/MarkdownTest_1.0/Tests/Inline HTML comments.html
  74. +13 −0 conformance_test/MarkdownTest_1.0/Tests/Inline HTML comments.text
  75. +9 −0 conformance_test/MarkdownTest_1.0/Tests/Links, inline style.html
  76. +9 −0 conformance_test/MarkdownTest_1.0/Tests/Links, inline style.text
  77. +18 −0 conformance_test/MarkdownTest_1.0/Tests/Links, reference style.html
  78. +31 −0 conformance_test/MarkdownTest_1.0/Tests/Links, reference style.text
  79. +3 −0 conformance_test/MarkdownTest_1.0/Tests/Literal quotes in titles.html
  80. +7 −0 conformance_test/MarkdownTest_1.0/Tests/Literal quotes in titles.text
  81. +314 −0 conformance_test/MarkdownTest_1.0/Tests/Markdown Documentation - Basics.html
  82. +306 −0 conformance_test/MarkdownTest_1.0/Tests/Markdown Documentation - Basics.text
  83. +942 −0 conformance_test/MarkdownTest_1.0/Tests/Markdown Documentation - Syntax.html
  84. +888 −0 conformance_test/MarkdownTest_1.0/Tests/Markdown Documentation - Syntax.text
  85. +9 −0 conformance_test/MarkdownTest_1.0/Tests/Nested blockquotes.html
  86. +5 −0 conformance_test/MarkdownTest_1.0/Tests/Nested blockquotes.text
  87. +137 −0 conformance_test/MarkdownTest_1.0/Tests/Ordered and unordered lists.html
  88. +122 −0 conformance_test/MarkdownTest_1.0/Tests/Ordered and unordered lists.text
  89. +7 −0 conformance_test/MarkdownTest_1.0/Tests/Strong and em together.html
  90. +7 −0 conformance_test/MarkdownTest_1.0/Tests/Strong and em together.text
  91. +25 −0 conformance_test/MarkdownTest_1.0/Tests/Tabs.html
  92. +21 −0 conformance_test/MarkdownTest_1.0/Tests/Tabs.text
  93. +8 −0 conformance_test/MarkdownTest_1.0/Tests/Tidyness.html
  94. +5 −0 conformance_test/MarkdownTest_1.0/Tests/Tidyness.text
  95. +89 −0 docs/ExtensionsAndRenderFlags.md
  96. +76 −0 docs/Render.md
  97. +109 −0 examples/Man.php
  98. +161 −0 package.xml
  99. +268 −0 php_sundown.c
  100. +309 −0 php_sundown.h
  101. +721 −0 render_base.c
  102. +874 −0 render_html.c
  103. +134 −0 render_xhtml.c
  104. +0 −300 src/array.c
  105. +0 −147 src/array.h
  106. +0 −261 src/autolink.c
  107. +0 −36 src/autolink.h
  108. +0 −323 src/buffer.c
  109. +0 −154 src/buffer.h
  110. +0 −6 src/config.m4
  111. +0 −6 src/config.w32
  112. +0 −663 src/html.c
  113. +0 −62 src/html.h
  114. +0 −359 src/html_smartypants.c
  115. +0 −2,261 src/markdown.c
  116. +0 −117 src/markdown.h
  117. +0 −284 src/php_sundown.c
  118. +0 −24 src/php_sundown.h
  119. +1 −1 sundown
  120. +590 −0 sundown_markdown.c
  121. 0 {src → }/tests/001.phpt
  122. 0 src/tests/002-constructor-arguments.phpt → tests/002-basic-constructor-arguments.phpt
  123. +124 −0 tests/002-basic-enabled-extensions.phpt
  124. +217 −0 tests/002-basic-enabled-render-flags.phpt
  125. 0 src/tests/003-to_html.phpt → tests/002-basic-to_html.phpt
  126. +17 −0 tests/002-constructor-arguments.phpt
  127. +14 −0 tests/003-advanced-constructor.phpt
  128. +126 −0 tests/003-advanced-enabled-extensions.phpt
  129. +205 −0 tests/003-advanced-enabled-render-flags.phpt
  130. +43 −0 tests/003-advanced-get-extensions.phpt
  131. +20 −0 tests/003-advanced-get-render.phpt
  132. +27 −0 tests/003-advanced-render-base-get_render_flags.phpt
  133. +37 −0 tests/003-advanced-render-base-set_render_flags.phpt
  134. +13 −0 tests/003-advanced-render-html-block_code.phpt
  135. +10 −0 tests/003-advanced-render-html-block_html.phpt
  136. +11 −0 tests/003-advanced-render-html-block_quote.phpt
  137. +14 −0 tests/003-advanced-render-html-header.phpt
  138. +18 −0 tests/003-advanced-render-html-list.phpt
  139. +10 −0 tests/003-advanced-render-html-paragraph.phpt
  140. +35 −0 tests/003-advanced-set-extensions.phpt
  141. +17 −0 tests/003-to_html.phpt
View
@@ -1,27 +1,44 @@
*.o
+# ignore sundown sources.
+autolink.c
+autolink.h
+buffer.c
+buffer.h
+houdini.h
+houdini_href_e.c
+houdini_html_e.c
+html.c
+html.h
+html_blocks.h
+html_smartypants.c
+stack.c
+stack.h
+markdown.c
+markdown.h
+
# ignore phpized files
-src/Makefile.global
-src/acinclude.m4
-src/aclocal.m4
-src/autom4te.cache
-src/build
-src/config.*
-src/configure
-src/configure*
-src/install-sh
-src/iltmain.sh
-src/missing
-src/mkinstalldirs
-src/run-tests.php
-src/*.lo
-src/.deps
-src/.libs
-src/libtool
-src/Makefile*
-src/modules
-src/ltmain.sh
-src/*.la
-src/tmp-php.ini
-src/php_test_results*
+Makefile.global
+acinclude.m4
+aclocal.m4
+autom4te.cache
+build
+config.*
+configure
+configure*
+install-sh
+iltmain.sh
+missing
+mkinstalldirs
+run-tests.php
+*.lo
+.deps
+.libs
+libtool
+Makefile*
+modules
+ltmain.sh
+*.la
+tmp-php.ini
+php_test_results*
View
@@ -0,0 +1,6 @@
+language: php
+php:
+ - 5.3
+ - 5.4
+
+script: rake submodule compile test
View
13 CREDITS
@@ -0,0 +1,13 @@
+Sundown were made by...
+-----------------------
+
+Copyright (c) 2009, Natacha Porté
+Copyright (c) 2011, Vicent Marti
+
+php-sundown inspired Redcarpet2 which is a ruby extension for parsing and rendering Markdown text.
+Vicent, Thanks for providing great libs and examples.
+
+php-sundown were made by...
+---------------------------
+
+Copyright (c) 2011-2012, Shuhei Tanuma
View
83 LICENSE
@@ -1,15 +1,68 @@
-Copyright (c) 2009, Natacha Porté
-Copyright (c) 2011, Vicent Marti
-Copyright (c) 2011, Shuhei Tanuma
-
-Permission to use, copy, modify, and distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+--------------------------------------------------------------------
+ The PHP License, version 3.01
+Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
+--------------------------------------------------------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, is permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ 3. The name "PHP" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact group@php.net.
+
+ 4. Products derived from this software may not be called "PHP", nor
+ may "PHP" appear in their name, without prior written permission
+ from group@php.net. You may indicate that your software works in
+ conjunction with PHP by saying "Foo for PHP" instead of calling
+ it "PHP Foo" or "phpfoo"
+
+ 5. The PHP Group may publish revised and/or new versions of the
+ license from time to time. Each version will be given a
+ distinguishing version number.
+ Once covered code has been published under a particular version
+ of the license, you may always continue to use it under the terms
+ of that version. You may also choose to use such covered code
+ under the terms of any subsequent version of the license
+ published by the PHP Group. No one other than the PHP Group has
+ the right to modify the terms applicable to covered code created
+ under this License.
+
+ 6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes PHP software, freely available from
+ <http://www.php.net/software/>".
+
+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
+DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the PHP Group.
+
+The PHP Group can be contacted via Email at group@php.net.
+
+For more information on the PHP Group and the PHP project,
+please see <http://www.php.net>.
+
+PHP includes the Zend Engine, freely available at
+<http://www.zend.com>.
Oops, something went wrong.

0 comments on commit 3f0f1c5

Please sign in to comment.