Open tlawrie opened 3 months ago
Similar to: https://github.com/rehype-pretty/rehype-pretty-code/issues/52
Albeit we want to change the line number encapturing as well
Turns out this can be done by
filterMetaString: (str) => str.replace(/lines=\[([^]*)\]/g, '{$1}').replace(/filename=([^ ]*)/g, 'title="$1"'),
This should be added to the documentation as an example.
Description
For those of us transitioning from a previous module to rehype-pretty-code we may already have code meta which would break prior versions of documentation.
For example
title=
may befilename=
orheading=
lines[x,z]
or#x,z
instead of{x,z}