protected function getConfig($data = []) {
		// HTMLPurifier configuration
		$config = HTMLPurifier_Config::createDefault();
		$config->autofinalize = false;

		// Set default settings, 'default' key must exist
		if (empty($data)) {
			$data = 'default';
		}

		// If string given, get the config array
		if (is_string($data)) {
			$data = config(sprintf(
				'parsedownextra.purifier.settings.%s',
				$data
			));
		}

		// Merge both global and default settings
		$data = array_replace_recursive(
			(array) config('parsedownextra.purifier.settings.global'),
			(array) $data
		);

		// At this point $data should be an array
		if (is_array($data)) {
			$config->loadArray($data);
		}

		return $config;
	}