Error in smart-quote rendering
#136
Closed
opened 8 years ago by olivertaylor
·
3 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Given this example:
This is a "◊em{simple}" --- test.
The result is:
This is a "<em>simple</em>“—test.
The output should be:
This is a “<em>simple</em>”—test.
The
smart-quotes
function is “shallow” in the sense that it only looks to the immediate left & right to determine what kind of curly quote to use (I concede this is not ideal, but that is why it’s relegated to theunstable
collection.)The problem with putting an embedded X-expression flush against to the quote is that you’d have to descend into the X-expression to find out if the next character triggers a curly quote. Your example is simple, but in fact the X-expressions could be nested to any depth. This seems potentially messy & slow. Though it’s probably just a matter of trying harder.
Thanks!