0 users online. Create an account or sign in to join them.Users

Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#270: [2.0.8 RC1] Markdown formatter is missing "without Extra and SmartyPants" option

Maybe this will be considered an extension bug. Feel free to move it.

The latest version of the Markdown Textformatter extension has no option to use Markdown without Extra and SmartyPants. This option is very important, because typographic quotes which are generated by SmartyPants are completely wrong in many languages. In these cases it is the best choice to switch it off.

Older versions of the Markdown Textformatter extension even had three options:

  • Markdown Text Formatter
  • Markdown Extra Text Formatter
  • Markdown Extra plus SmartyPants

I’d really like to see those options in the latest version as well.

This option is very important, because typographic quotes which are generated by SmartyPants are completely wrong in many languages.

I was not aware of this problem. I rolled the 3 different options into a single formatter as I felt it was unnecessary. I’ll look at splitting out the smartypants option. For interests sake, can you give me an example of how they are wrong in other languages?

OK, here we go:

  • In English, he said: “test”. (This is what SmartyPants will do.)
  • Im Deutschen sagte er: „test“. (German)
  • En français il a dit: «test» (French)

These are the typographically correct quotes (I hope). As you may imagine, a German or French website might rather go with straight quotes than with the SmartyPants version. This is indeed the case rather often. (Unfortunately changing the Markdown logic to do everything right in a different language would be a tremendous undertaking — there is much more than these double quotes…)

Please re-enable all 3 different options. It’s might be useful to have “pure Markdown” as well.

In German “French” quoting style is also valid but the quotes are swapped:

Im Deutschen sagte er: »test«. 

(Unfortunately changing the Markdown logic to do everything right in a different language would be a tremendous undertaking — there is much more than these double quotes…)

I’ve once created a German version of Textile while using Textpattern. Beside the different syntaxes it works quite similar to Markdown (with Smartypants) as it’s regex based. To set up a German version the most important changes are double and single quotes as well as dashes which can be set up easily using Smartypants. There is one general problem: Smartypants is not able to detect single dashes and apostrophs correctly as the usage depends on the context of the content that is not always machine parseable. This is true for English as well.

In German “French” quoting style is also valid but the quotes are swapped

That’s true. This style is often used in book typesetting.

Anyway. In most cases I used pure Markdown for textarea fields, sometimes Markdown Extra. It would be good to have these options back.

Plus, if a textarea has already been set to use Markdown Extra plus SmartyPants and the Markdown extension is updated to the latest version, attempting to create new entries will result in an error:

Could not find Text Formatter pb_markdownextrasmartypants. If the Text Formatter was provided by an Extensions, ensure that it is installed, and enabled.
/Users/stephen/Sites/bauhouse-2/symphony/lib/toolkit/class.textformattermanager.php line 84

79          
80          $classname = $this->__getClassName($name);          
81          $path = $this->__getDriverPath($name);
82
83          if(!@is_file($path)){
84              trigger_error(__('Could not find Text Formatter %s. If the Text Formatter was provided by an Extensions, ensure that it is installed, and enabled.', array($name)), E_USER_ERROR);
85              return false;
86          }
87          
88          if(!@class_exists($classname))

The solution is either to git checkout the previous version of Markdown or to resave every section that uses a textarea with the Markdown Extra plus SmartyPants to use another text formatter.

Plus, if a textarea has already been set to use Markdown Extra plus SmartyPants and the Markdown extension is updated to the latest version, attempting to create new entries will result in an error

I just had this after updating 2.0.6 to 2.0.8 and updating the Markdown formatter. Since the formatter is renamed (I was using the full “Markdown with etc”) my “formatted” textarea entries have lost their Markdown formatting in DS XML. So when I return to edit my Section, the formatter selection is no longer there.

This is critical to me because it breaks backwards compatibility.

To clarify this bug is in several parts:

  • we are missing the full array of Markdown types (we used to have 3: normal, Extra and Extra with Smartypants)
  • the new version renames “Markdown Text Formatter” to “Markdown”, thereby breaking backwards compatibility (when editing a section the old selection is lost because string-matching fails “pb_markdown” and “markdown”)

http://github.com/symphony/symphony-2/commit/facb499dda58113c888def8855e072c7adb368a4

Integration is tracking version 1.11 of the Markdown extension. It has the original formatters in it and an update function which will attempt to update old references to the pb_* formatters.

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.1
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details