-
-
Save Jermolene/47f5607cbae2fb7a4376 to your computer and use it in GitHub Desktop.
Word counting hack for TiddlyWiki 5.1.7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tag="mytag";r="";$tw.wiki.each(function(t){if(t.hasTag(tag)){r=r+" "+(t.fields.text||"")}});r.trim().replace(/\s+/gi," ").split(" ").length |
how might this be used to restrict the number of words, like in Twitter.
user story: I am writing a pitch for my startup, it needs to be in a sentence of less than 30 words
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Jermolene You are amazing, thank you!