tannerdolby / eleventy-plugin-metagen

Eleventy shortcode that generates document metadata
https://www.npmjs.com/package/eleventy-plugin-metagen
MIT License
41 stars 3 forks source link

Issue with commas being removed from content="" attributes for generated tags #2

Closed tannerdolby closed 4 years ago

tannerdolby commented 4 years ago

I noticed when using the plugin in another project whatt2watch, that , commas were being removed from the content="" attribute for generated tags.

I think this has to do with the RegEx I'm using to string away space from the output, need to investigate.

tannerdolby commented 4 years ago

Ah, yes. I got it. It's the usage of .split(", \n"). Fix this and use regex to search and remove commas at the end of the line, instead of allowing them to be removed from content="".

tannerdolby commented 4 years ago

I updated the regex to replace commas at the end of the line with empty space and cleaned up the .join("\n") usage since it uses a comma separator by default!

Fixed with commit 8692806.. have a look