hexojs / hexo-util

Utilities for Hexo.
MIT License
93 stars 59 forks source link

Parsing code for YouTube Tag Plugin #381

Closed bennycode closed 1 year ago

bennycode commented 1 year ago

Hello, I am looking for the code responsible parsing YouTube tags. I found youtube.ts in hexo-tag-embed but it only consumes already parsed information.

Do you know where I can actually find the regex that splits a {% youtube ... %} tag?

uiolee commented 1 year ago

I don't understand what you want, but I guess youtube.ts is a way to parse YouTube Tag.

BTW, you should post this question in discussion/Q&A

stevenjoezhang commented 1 year ago

Hexo uses Nunjucks for document preprocessing, so you can find how it processes tags in the Nunjucks source code.

bennycode commented 1 year ago

Thank you! This aligns with the comment from here: https://github.com/hexojs/hexo-tag-embed/issues/1#issuecomment-1768968172 👍