You are here

public static function FootnoteExtension::defaultSettings in Markdown 8.2

Provides the default settings for the plugin.

Parameters

\Drupal\markdown\Annotation\InstallablePlugin $pluginDefinition: The plugin definition.

Return value

array The default settings.

Overrides SettingsTrait::defaultSettings

File

src/Plugin/Markdown/CommonMark/Extension/FootnoteExtension.php, line 97

Class

FootnoteExtension
Footnotes extension.

Namespace

Drupal\markdown\Plugin\Markdown\CommonMark\Extension

Code

public static function defaultSettings($pluginDefinition) {

  /* @var \Drupal\markdown\Annotation\InstallablePlugin $pluginDefinition */

  // Immediately return if not using the newer bundled extension.
  if ($pluginDefinition->object === 'RZ\\CommonMark\\Ext\\Footnote\\FootnoteExtension') {
    return [];
  }
  return [
    'backref_class' => 'footnote-backref',
    'container_add_hr' => TRUE,
    'container_class' => 'footnotes',
    'footnote_class' => 'footnote',
    // CommonMark defaults to using a colon delimiter ("fn:"), however
    // this causes core's XSS filter to strip everything past it; use a
    // hyphen (-) instead.
    // @see https://www.drupal.org/project/drupal/issues/2544110
    'footnote_id_prefix' => 'fn-',
    'ref_class' => 'footnote-ref',
    // CommonMark defaults to using a colon delimiter ("fnref:"), however
    // this causes core's XSS filter to strip everything past it; use a
    // hyphen (-) instead.
    // @see https://www.drupal.org/project/drupal/issues/2544110
    'ref_id_prefix' => 'fnref-',
  ];
}