How to ensure that symbols in a topic appear only for the first occurrence of the word? #1659
-
In my topic, the product name, say ABC, is used multiple times. I have the name ABC defined in a file so everyone in my team use the same name. We use the Snippet extension. The requirement is to have the registered trademark symbol appear only on the first occurrence of the product name. So, if the source has: The output should be: Is there a way to handle this case? Syed |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
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 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. |
Beta Was this translation helpful? Give feedback.
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.