Skip to content

How to ensure that symbols in a topic appear only for the first occurrence of the word? #1659

Answered by facelessuser
syeda-git asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not quite sure what this has to do with Snippets. I assume this question is actually more about SmartSymbols.

SmartSymbols is meant to translate certain syntax to symbols, in your case, any time it sees (r) to ®, assuming this symbol is enabled in SmartSymbols. If you do not want a symbol to be processed, you need to escape them, e.g., \(r).

You are essentially asking for SmartSymbols to keep track of whether it has seen a given symbol, and then throw it away if it already has. This kind of logic would not apply to most symbols, and unfortunately is so niche, and specific to your special needs, that it doesn't make sense as a generalized feature in Pymdown Extensions.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@facelessuser
Comment options

@syeda-git
Comment options

@facelessuser
Comment options

Answer selected by facelessuser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants