Unverified Commit 41a9b825 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3066512 by jhodgdon, Amber Himes Matz, alexpott, andypost, scott_euser,...

Issue #3066512 by jhodgdon, Amber Himes Matz, alexpott, andypost, scott_euser, Charlie ChX Negyesi, larowlan: Add checks for syntax and display of help topic Twig template files
parent e3761163
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,6 +2,6 @@
label: 'Making your site secure'
top_level: true
related:
  - menu_ui.menu_overview
  - core.menu_overview
---
<p>{% trans %}The topics listed here will help you make and keep your site secure.{% endtrans %}</p>
+3 −3
Original line number Diff line number Diff line
@@ -99,12 +99,12 @@ public function findAll() {
        $plugin_id = substr(basename($file), 0, -10);
        // The plugin ID begins with provider.
        list($file_name_provider,) = explode('.', $plugin_id, 2);
        // Only the Help Topics module can provider help for other extensions.
        // @todo https://www.drupal.org/project/drupal/issues/3025577 Remove
        // Only the Help Topics module can provide help for other extensions.
        // @todo https://www.drupal.org/project/drupal/issues/3072312 Remove
        //   help_topics special case once Help Topics is stable and core
        //   modules can provide their own help topics.
        if ($provider !== 'help_topics' && $provider !== $file_name_provider) {
          throw new DiscoveryException("$file should begin with '$provider.'");
          throw new DiscoveryException("$file file name should begin with '$provider'");
        }
        $data = [
          // The plugin ID is derived from the filename. The extension
+5 −0
Original line number Diff line number Diff line
---
label: 'Help topic with bad HTML syntax'
top_level: true
---
<p>{% trans %}Body goes here{% endtrans %}</h3>
+4 −0
Original line number Diff line number Diff line
---
label: 'Help topic containing no body'
top_level: true
---
+5 −0
Original line number Diff line number Diff line
---
label: 'Help topic with H1 header'
top_level: true
---
<h1>{% trans %}Body goes here{% endtrans %}</h1>
Loading