Hi Danielo This is exactly how I would do it: The system uses the same hashing macro as the CSS developer. This makes sure, they get the same results.
Am Montag, 29. August 2016 10:24:06 UTC+2 schrieb Danielo Rodríguez: > > >>> The problem with hash values is, that if the tiddler title is changed, >> there is absolutely no way to find the "tiddler name" (responsible for the >> styling), if you only know the hash from the CSS definition. >> >> The existing way, at least gives you a hint, about the connection between >> tag name and CSS class name. >> > > In case we use hashes we should also provide a macro that , passing the > title as argument, returns the hash. Something similar to what the qualify > macro does. > Here is the hashing macro I used for TextStretch <http://tid.li/tw5/hacks.html#TextStretch> (it simply calls the core function for this): /*\ title: $:/core/modules/macros/HashStr.js type: application/javascript module-type: macro Generate a numeric hash from a string uses $:/core/modules/utils/utils.js \*/ (function(){ /*jslint node: true, browser: true */ /*global $tw: false */ "use strict"; /* Information about this macro */ exports.name = "HashStr"; exports.params = [ {name: "str"} ]; /* Run the macro */ exports.run = function(str) { var hash = $tw.utils.hashString(str); return hash; }; })(); Good luck! Thomas -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e8870638-71b8-49ed-bfa0-8f6d1c5f1fdf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

