-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserving folded blocks when rewriting YAML #137
Comments
This would require preserving meta-information about the storage format in the converted objects. R could do this utilizing attributes. However, this library utilizes the libyaml library. This meta-information is stripped before it's tokenized. Without diving into the next library down it's not possible.
The str handler is what passed from the yaml tokenizer. If I get down into that level I'll be finishing yaml 1.2 compliance. |
I'm developing a package that can insert author metadata in YAML header of Quarto files. I do this by rewriting YAML blocks using the following steps:
The problem is that some information are lost in the process, including folded blocks:
My question is: is there any way to preserve folded blocks in that case? I'm not aware of a special type I can use to target the
>
with a handler.I'm considering to insert author data in a separate YAML header when my insert function detects complex cases (e.g. the use of custom tags, repeated blocks, comments being dropped due to the libyaml dependency, etc.). I would prefer to do that on rare occasions though.
The text was updated successfully, but these errors were encountered: