Snippet ddTypograph 2.0 b to EMT-lib-3.2 (MODX Evo)

Hello!

Not so long ago, Eugene Muravyev has released a completely new version of its famous beetle 3.0. Any product it should be a little obratitsya, the very first version is usually buggy, because we waited for version 3.2 and started to watch it. I must say that overall, the new printer has left a positive impression.

image

It would be more linear transfer parameters in the current version much easier to understand. Now, if we want to automatically hyphenate paragraphs, just put the option ‘Text.paragraphs’ value ‘on’ (or ‘off’ to disable). It is not clear, however, why you have not used the usual Boolean true and false, but come on, this is not so important.

Despite its relative youth, the printer showed itself from the best side. We tried to test the library to the max, everything seems to be more or less good, many bugs of the old version is not there.

An interesting feature of the new version of the library is placing all the code in one file (3 281 string). On the one hand, it's not very convenient to understand the code (and refactor is probably not comfortable), on the other, it is easier for end-users — one file much less frightening, causes less autoridade than 13 =)

Slightly disappointed by the lack of proper documentation, had a bit dig deeper in the code, but were quickly found a method "get_options_list", which displays a list of all options with the human description (but unfortunately, not for all of the options descriptions is sufficient). Still severely lacking library on GitHub.

In the end, we released a new version of a snippet ddTypograph 2.0 b. Options at the library quite a lot, but in the snippet we felt it appropriate to only do 4:


A full list of options with their descriptions you can see in the code snippet, there are visible values by default. With the human description of the library Muraviev can be found on
official website.

Please help to test the snippet. May be something is not working very well or I was missing some vital options for your needs. We'd love to hear your thoughts here in the comments or via email (code@divandesign.biz).

PS: the picture in the post used with the mdash.ru, I hope the authors of the public domain are not against ;-).

P. P. S.: emuravjev if you are reading this, please respond to my email or Skype.

P. P. P. S.: the Snippet on GitHub.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

March Habrameeting in Kiev

PostgreSQL load testing using JMeter, Yandex.Tank and Overload

Monitoring PostgreSQL with Zabbix