Amaury / SkrivMarkup

Interpreter of the Skriv Markup Language.
GNU Lesser General Public License v2.1
25 stars 3 forks source link

Bug with [[[ markup #2

Closed marmotz closed 11 years ago

marmotz commented 11 years ago

I don't know if it's the fault of SkrivMarkup or wikirenderer, but the follwing source does not work properly:

[[[shell
php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
Update to version 'nightly-1568-201210311708'... Done !
Enable version 'nightly-1568-201210311708'... Done !
Atoum was updated to version 'nightly-1568-201210311708' successfully !
]]]

S'il n'y a pas de version plus récente disponible, atoum s'arrêtera immédiatement:

[[[shell
php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
There is no new version available !
]]]

generated:

<pre class="shell">php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
Update to version 'nightly-1568-201210311708'... Done !
Enable version 'nightly-1568-201210311708'... Done !
Atoum was updated to version 'nightly-1568-201210311708' successfully !
]]]

S'il n'y a pas de version plus récente disponible, atoum s'arrêtera
immédiatement:

[[[shell
php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
There is no new version available !</pre>

expected:

<pre class="shell">php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
Update to version 'nightly-1568-201210311708'... Done !
Enable version 'nightly-1568-201210311708'... Done !
Atoum was updated to version 'nightly-1568-201210311708' successfully !
</pre>

<p>S'il n'y a pas de version plus récente disponible, atoum s'arrêtera
immédiatement:</p>

<pre class="shell">
php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
There is no new version available !</pre>
Amaury commented 11 years ago

It's very strange. My own test with your input text is bad too, but slightly different:

<pre class="shell">
php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
Update to version 'nightly-1568-201210311708'... Done !
Enable version 'nightly-1568-201210311708'... Done !
Atoum was updated to version 'nightly-1568-201210311708' successfully !</pre>

<p>S'il n'y a pas de version plus récente disponible, atoum s'arrêtera immédiatement:</p>

<pre class="shell">
php -d phar.readonly=0 mageekguy.atoum.phar --update
Checking if a new version is available... Done !
There is no new version available !
]]]
</pre>

Not so bad. Just a superfluous ]]] at the end. I'll take a look at it.

marmotz commented 11 years ago

You can test with this file: https://github.com/atoum/atoum-documentation/blob/skriv/fr/Contents/chapter1.sml

Amaury commented 11 years ago

I'm just thinking about something: I'd prefer to use .skriv file extension, rather than .sml.

.sml is already used by Standard ML, SMIL format and the Simile software.

Amaury commented 11 years ago

I committed a version that handles your code correctly. Can you check it?

You have to update SkrivMarkup and WikiRenderer.

marmotz commented 11 years ago
PHP Notice:  Undefined property: Skriv\Markup\Html\Title::$config in <snip>/vendor/amaury/skrivmarkup/lib/Skriv/Markup/Html/Title.php on line 26
PHP Fatal error:  Call to a member function getParam() on a non-object in <snip>/vendor/amaury/skrivmarkup/lib/Skriv/Markup/Html/Title.php on line 26
marmotz commented 11 years ago

okay, i change .sml to .skriv :)

Amaury commented 11 years ago

Titles should work now. That's the problem with a work in progress ;-)

marmotz commented 11 years ago

I don't know what you change, but it works perfectly !!!!

Thanks !

Amaury commented 11 years ago

Cool. I'm still modifying a lot of things, it would break again from time to time. I will do the TOC stuff before writing tests.

marmotz commented 11 years ago

Ok, thanks a lot !!!

I really love SkrivMarkup syntax !!!!

Simple and powerfull !

Amaury commented 11 years ago

Thank you. I'm very pleased to know that. :-)