yaml_character_handler | R Documentation |
This handler bridges the gap between R's yaml package (YAML 1.1) and js-yaml (YAML 1.2) by quoting strings with leading zeros that would be misinterpreted as octal numbers.
yaml_character_handler(x)
x |
A character vector |
According to YAML 1.1 spec, octal integers are 0o[0-7]+
. The R yaml
package only quotes valid octals (containing only digits 0-7), but js-yaml
attempts to parse ANY leading zero string as octal, causing data corruption
for invalid octals like "029" → 29.
The input with quoted attributes applied where needed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.