Commit 86ff2171 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix when frontmatter output format is not set

parent 07c73880
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -310,7 +310,12 @@ def main(args=None):
		yaml.add_representer(dict, lambda self, data: yaml.representer.SafeRepresenter.represent_dict(self, data.items()))

		# get output format and output file
		match args.frontMatterOutFormat:
		# Ensure we have a valid format, defaulting to 'yaml' if not set
		format = getattr(args, 'frontMatterOutFormat', 'yaml')
		if format is None:
			format = 'yaml'
		
		match format:
			case 'json':
				if args.frontMatterOutFile:
					if args.verbose: