Skip to content

Commit

Permalink
Merge branch 'release/0.3.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
chobie committed May 14, 2012
2 parents aae4fbf + 6fe73e8 commit 8523882
Show file tree
Hide file tree
Showing 12 changed files with 900 additions and 116 deletions.
17 changes: 0 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
*.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
Makefile.global
acinclude.m4
Expand Down
61 changes: 61 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
2010-04-22 Shuhei Tanuma <[email protected]>

* bumped up 0.3.3:

[summary]
* fix #16 missing space_after_headers extension

2010-04-02 Shuhei Tanuma <[email protected]>

* bumped up 0.3.1:

[summary]
* fixed overloading callback methods.
* fixed segfault when calling render method more than once.
* implement more test cases.

2010-03-04 Shuhei Tanuma <[email protected]>

* bumped up 0.3.0:

change callback method name for PECL standards.
php-sundown aims to implement more test cases until next minor version release.

[summary]
* change callback method names for PECL standards
* fix segfault when using XHTML render
* fix getting render flags issue
* improve Sundown\Markdown
don'd read render / extensions property directly.
* fix memory leaks
* implement more test cases.

2010-03-04 Shuhei Tanuma <[email protected]>

* 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()

* update bundled Sundown library

[summary]
* Fix segfault on empty link refs
* Escape html inside table of contents.
* hanging whitespace breaks tables


2010-02-05 Shuhei Tanuma <[email protected]>

* bumped up 0.2.0:
- Initial PECL Sundown release.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ Install for developpers

git clone https://github.com/chobie/php-sundown.git php-sundown -b development
cd php-sundown
# this command will fetch submodule and copy neccesally files to src dir. and compile it.
rake submodule compile
sudo rake install
git submodule init && git submodule update
phpze
./configure
make
make install
# please add following line to your php.ini
# extension=sundown.so

Expand Down Expand Up @@ -229,6 +231,28 @@ $md = new \Sundown\Markdown(\Sundown\Render\HTML,array("autolink"=>true));
$md->getRender()->setRenderFlags(array("filter_html"=>true));
````

### \Sundown\Markdown::setRender(Sundown\Render\Base $render)

##### *Description*

set render instance.

##### *Parameters*

*render*: render instance

##### *Return Value*

* void

##### *Example*

````php
<?php
$md = new \Sundown\Markdown(\Sundown\Render\HTML,array("autolink"=>true));
$render2 = \Sundown\Render\HTML();
$md->setRender($render2);
````

### \Sundown\Render\Base

Expand Down
14 changes: 2 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,8 @@ task "test:conformance" do
end

desc 'Gather required Sundown sources into extension directory'
task :gather => 'sundown/src/markdown.h' do |t|
files =
FileList[
'sundown/src/{markdown,buffer,stack,autolink,html_blocks}.h',
'sundown/src/{markdown,buffer,stack,autolink}.c',
'sundown/html/{html,html_smartypants,houdini_html_e,houdini_href_e}.c',
'sundown/html/{html,houdini}.h',
]
cp files, './',
:preserve => true,
:verbose => true
task :gather do
abort "gather task become deprecated. now you don't need call this task."
end

file 'sundown/src/markdown.h' do |t|
Expand All @@ -52,5 +43,4 @@ end
task :submodule do
sh "git submodule init"
sh "git submodule update"
Rake::Task['gather'].invoke
end
43 changes: 28 additions & 15 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@ PHP_ARG_ENABLE(sundown,Whether to enable the "sundown" extension,
[ --enable-sundown Enable "sundown" extension support])

if test $PHP_SUNDOWN != "no"; then
PHP_NEW_EXTENSION(sundown,
php_sundown.c \
sundown_markdown.c \
render_base.c \
render_html.c \
render_xhtml.c \
buffer.c \
markdown.c \
html.c \
html_smartypants.c \
autolink.c \
stack.c \
houdini_href_e.c \
houdini_html_e.c \
, $ext_shared)
SUNDOWN_SOURCES="
php_sundown.c
sundown_markdown.c
render_base.c
render_html.c
render_xhtml.c
render_html_toc.c
sundown/src/buffer.c
sundown/src/markdown.c
sundown/src/autolink.c
sundown/src/stack.c
sundown/html/html.c
sundown/html/html_smartypants.c
sundown/html/houdini_href_e.c
sundown/html/houdini_html_e.c
"

PHP_NEW_EXTENSION(sundown,$SUNDOWN_SOURCES, $ext_shared)
CFLAGS=" -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration"
PHP_SUBST([CFLAGS])

PHP_ADD_BUILD_DIR([$ext_builddir/sundown/src])
PHP_ADD_BUILD_DIR([$ext_builddir/sundown/html])

PHP_ADD_INCLUDE([$ext_srcdir/sundown/src])
PHP_ADD_INCLUDE([$ext_srcdir/sundown/html])
PHP_ADD_INCLUDE([$ext_builddir/sundown/src])
PHP_ADD_INCLUDE([$ext_builddir/sundown/html])
fi
Loading

0 comments on commit 8523882

Please sign in to comment.