How to disable wikitext's smartypantsy behavior?

Hi!
Wikitext changes my hyphens, which I do not want it to do.
How can I (permanently) deactivate such smartypantsy behavior?
Have a nice day.

Hi @Jeronimo_Minino

What kind of changes are you talking about? Does TiddlyWiki change what you type on your keyboard while you’re in Edit Mode, or is the text you typed in Edit Mode shown differently when the tiddlers are displayed in View Mode?

Fred

If you mean that, when wikitext is rendered, two or three hyphens in a row are converted to an “emdash” (sort of a long hyphen), then you can go to $:/ControlPanel > Info > Advanced > Parsing and clear the checkbox for “dash” (in the “Inline Parse Rule” section). Note that you need to save-and-reload for this change to take effect.

Also note that if you only want to disable this rule for a specific tiddler’s content, you can put the following line at the beginning of that tiddler:

\rules except dash

-e

3 Likes

Hi, Fred.
I mean that, when wikitext is rendered, two or three hyphens in a row are converted to an “emdash” . Eric has some suggestions that I will try.
Thank you.

Hi, Eric.
Thank you very much.
In
$:/ControlPanel > Info > Advanced > Parsing
there is a warning that states:
“Disabling certain parser rules can prevent TiddlyWiki from functioning correctly”.
For some reason, I see that “wikilink” was unchecked.
And now I unchecked “dash”.
Should I expect that TW may not function correctly?

The “wikilink” parsing rule only affects automatic linking of “CamelCase” text. This used to be enabled by default, but is now turned off by default. The “dash” parsing rule only affects the appearance of double or triple dash sequences, and should not impact TWCore functionality in any way.

I see.
Thank you very much!
Have a nice day!

Thanks for this question. It reminded me of a weakness in the parese-rule settings, that I wanted to improve for a long time already.

Changing the default rules is rarely requested, but for some users it is necessary to make wikitext behave well. For whatever reason that is.

For most of the settings it is perfectly fine to disable them. They change “cosmetics”. But some are “fatal” and we know them. So we definitely should make it much clearer, what is safe to change and what not.

There is still a small amount of uncertainty, because we do not know, which plugin combinations our end users use and if there are side effects.

So we do need a “basic” warning, that there can be unwanted side effects. But I think we should make it safe for users to experiment.

I did create a GitHub issue, to make sure we do not forget about it. [BUG] Disabling some parsing rules can "destroy" the core UI · Issue #9440 · TiddlyWiki/TiddlyWiki5 · GitHub

2 Likes

wrt
-a

what methods (would */you suggest) might be considered? to achieve this!

-b

:thinking:

Don’t for get what eric said here, a pragma on any tiddler can be used to include an exclude a rule only for a specific tiddler. However you could use import variables with a condition to apply it to a subset of tiddlers via a filter so it need not only be global or local.