How can I process tags if they are space-separated?

Help.
I have lots of legacy markdown contents, which have front matter. but tags in there is authored like: tags: tag1 tag2 tag3. however hugo need the tags front matter need the format like “tags: [tag1, tag2]” etc.

how can i handle this if i want to use tag taxonomies.

Write a script to make the changes on your files. That is your option, if you have a lot of files to edit. Otherwise, manually edit them.