Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

No intra emphasis not working #14

Closed
ikwattro opened this Issue Apr 18, 2012 · 9 comments

Comments

Projects
None yet
3 participants

kwattro/KwattroMarkdownBundle#5

Hi @chobie , It seems that no_intra_emphasis and _lax_render_htmls are not working, I have add some tests into my build and it confirms it.

Can you take a look at this ? PECL package 0.3.1 used.

Thanks

for e.g. the following test will fail :

public function testWithBaseSundownClasses()
    {
        $md = new \Sundown\Markdown(\Sundown\Render\HTML,array("no_intra_emphasis"=>true));
        $txt = "no_intra_emphasis";
        $exp = '<p>'.$txt.'</p>.'."\n";
        $this->assertEquals($exp, $md->render($txt));
    }

result of phpunit test :

Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'no_intra_emphasis'
+'<p>no<em>intra</em>emphasis</p>
+'
Owner

chobie commented Apr 18, 2012

Probably it should be 'no_intraemphasis' i'll fix the document. could you try to use no_intraemphasis instead of no_intra_emphasis ?

https://github.com/chobie/php-sundown/blob/development/php_sundown.h#L261

Hi @chobie , Thanks for the tip, yes it seems to work. Do you gonna change the extension name or do we have to use no_intraemphasis ?

Owner

chobie commented Apr 19, 2012

@kwattro redcarpet uses no_intra_emphasis so I'll follow originally render extension name.
https://github.com/tanoku/redcarpet/blob/master/ext/redcarpet/rc_markdown.c#L32

I'll upload latest version today.

Ok supra cool then !

Hi,

I'd detect some other bugs for new line interpretation:

Original:

**test a écrit:**
> look 
> at
> 
> this
> 
> 
> Exemple !

Render:
test a écrit:

look
at
this
Exemple !

Do you see the fail ?

New lines are droped in the quotation.
Maybe a fail of the "lax_html_blocks" extension ?

This is so problematic and disturb users ^^

Thanks for all !

Owner

chobie commented Apr 20, 2012

@kwattro I've just uploaded it to PECL. Thank you so much.

@chobie chobie closed this Apr 20, 2012

Owner

chobie commented Apr 20, 2012

@Genokilller could you re-post as a new issue? I'll plan to update bundled sundown library soon.
probably it could fix i think.

Thanks reporting issue 😄

Thank you @chobie .

PS: I will do a complete test suite to be run. I'll post here the results of the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment