Accessing the Original Value of Directives in remark-directive #1398
-
I am developing an application that integrates remark-directive. In some cases, I need to access the original value of a directive, as the parsed version does not always meet my requirements. For example, given the following case: ::youtube{url="https://video.com" with="450px"} Currently, I only get the parsed value, but I would like to access the original string as well to process it as needed. Questions for the community:
Greetings |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I believe the solution is https://github.com/syntax-tree/unist-util-source |
Beta Was this translation helpful? Give feedback.
-
This feels a lot like an XY problem. https://xyproblem.info/
You probably don't want or need to do this, but if you choose to see @JounQin's answer https://github.com/orgs/remarkjs/discussions/1398#discussioncomment-11835478
What behavior do you want? |
Beta Was this translation helpful? Give feedback.
I believe the solution is https://github.com/syntax-tree/unist-util-source