Skip to content

v1.3.0

Compare
Choose a tag to compare
@BenjaminHoegh BenjaminHoegh released this 26 Aug 19:59
· 25 commits to main since this release
0b3b8fc

Note

ParsedownExtended 1.3.0 uses namespaces. Use use BenjaminHoegh\ParsedownExtended\ParsedownExtended

New Features

  • Link Configuration:

    • External Links: Added detailed configuration options for external links:
      • Control the enablement of external links. Default is true.
      • Nofollow: Automatically add nofollow to external links for better SEO management. Default is true.
      • Noopener: Adds noopener to improve security when opening external links. Default is true.
      • Noreferrer: Ensures that no referrer information is passed when opening external links. Default is true.
      • Open in New Window: External links will now open in a new window by default. Default is true.
      • Internal Hosts: Specify an array of internal hosts to be excluded from external link settings. Default is an empty array.
  • GFM Alerts: Added support for GitHub Flavored Markdown (GFM) alerts, enhancing the ability to display contextual messages in markdown.

    • Ability to set custom alerts using the new alerts.types setting.
  • Enhanced Configuration System:

    • A more robust configuration system has been implemented, featuring type validation and a simplified interface.
    • Management of settings has been streamlined using config()->set() and config()->get() methods.
    • Unified schema naming for a more consistent and intuitive configuration process.

Changes

  • Transliteration Update: The transliteration process now leverages the Transliterator module when available, providing better accuracy and performance.
  • Table of Contents (ToC) Configuration: The ToC ID setting has been integrated into the main configuration system for easier management.
  • Email Links: By default, email links will now open in an external window, enhancing user experience.

Bug Fixes

  • Abbreviation Registration: #69 Fixed an issue ensuring that predefined abbreviations didn't get correctly registered unless a abbreviation also was defined in the markdown.

Deprecations

The following methods and settings have been deprecated in favor of the new configuration system:

  • isEnabled: Use config()->get() instead.
  • setSetting, setSettings: Use config()->set() instead.
  • getSetting, getSettings: Use config()->get() instead.
  • abbreviations.allow_custom_abbr: Use abbreviations.allow_custom instead.
  • abbreviations.predefine: Use abbreviations.predefined instead.
  • emphasis.marking: Use emphasis.mark instead.
  • headings.allowed: Use headings.allowed_levels instead.
  • smarty: Use smartypants instead.
  • smarty.substitutions.left-angle-quote: Use smartypants.substitutions.left_angle_quote instead.
  • smarty.substitutions.left-double-quote: Use smartypants.substitutions.left_double_quote instead.
  • smarty.substitutions.left-single-quote: Use smartypants.substitutions.left_single_quote instead.
  • smarty.substitutions.right-angle-quote: Use smartypants.substitutions.right_angle_quote instead.
  • smarty.substitutions.right-double-quote: Use smartypants.substitutions.right_double_quote instead.
  • smarty.substitutions.right-single-quote: Use smartypants.substitutions.right_single_quote instead.
  • toc.toc_tag: Use toc.tag instead.
  • markup: Use allow_raw_html instead.
  • setTagToc(): Use the new configuration system instead, config()->set('toc.tag', '[TOC]').
  • toc.headings: Use toc.levels instead.

Backward Compatibility

All changes in this release are backward compatible, ensuring that existing functionality remains unaffected.