Closed FedericoStra closed 2 years ago
Sorry to bother you again, but I started using the new code in another project and I realized the custom formatting with feature_label =
is broken although the available tests couldn't detect it.
I accidentally introduced the bug when you asked me to remove the syn
dependency. With syn
I parsed a string literal with literal.value()
to access the contents represented by the string. With the change to rely only on proc_macro
, I inadvertently removed the parsing of the string literal. This has the effect that in the generated Markdown we now insert the string representation of the literal itself, and not its content.
To work around this I managed to find the litrs
crate which can parse string literals and is a much lighter dependency than syn
.
Moreover I added some tests that generate the self documentation with various string literals as feature_label
in order to check this functionality.
thanks
From the commit message: