--- /Users/scott/Downloads/heading/heading.module	2018-01-24 09:14:14.000000000 -0500
+++ ./heading.module	2018-03-20 14:45:49.000000000 -0400
@@ -27,12 +27,26 @@
  * This adds the missing token info for automatically detected tokens.
  */
 function heading_token_info_alter(&$info) {
-  $info['tokens']['paragraph-field_heading']['size'] = [
-    'name' => t('Heading: Size'),
-    'description' => t('The size (h1, h2, ...) of the heading.'),
-  ];
-  $info['tokens']['paragraph-field_heading']['text'] = [
-    'name' => t('Heading: Text'),
-    'description' => t('The text (content) of the heading.'),
-  ];
+
+  $headings = [];
+  $entities = \Drupal::service('entity_field.manager')->getFieldMap();
+  foreach ($entities as $entity_key => $entity) {
+    if ($entity_key == 'paragraph') {
+      foreach ($entity as $field_key => $field) {
+        if ($field['type'] == 'heading' ){
+          $headings[] = $field_key;
+        }
+      }
+    }
+  }
+  foreach ($headings as $heading) {
+    $info['tokens']['paragraph-'.$heading ]['size'] = [
+      'name' => t('Heading: Size'),
+      'description' => t('The size (h1, h2, ...) of the heading.'),
+    ];
+    $info['tokens']['paragraph-'.$heading ]['text'] = [
+      'name' => t('Heading: Text'),
+      'description' => t('The text (content) of the heading.'),
+    ];
+  }
 }
