I'm sure a lecture will come from this because it breaks the ability to
upgrade. ^-^;
Anyway you can do this with some core editing... Which is probably doable
as a plugin somehow but I'm not sure how.
If you wanted to use aa-123... (Lowercase than numbers) no core WikiLink
modding needs to be done.
and you just need to add this:
{
name: "bugurls",
match: "[a-z]{2}-[0-9]{1,50}",
handler: function(w)
{
w.outputText(createExternalLink(w.output,"http://www.bug.com\\"+w.matchText),w.matchStart,w.nextMatch);
}
},
With the "www.bug.com" part replaced with the url you want.
into the "//-- Standard formatters" section of the core.
If you want AA-123... (Uppercase than numbers you have to also edit the
core WikiLink system.)
For this you'll add this:
{
name: "bugurls",
match: "[A-Z]{2}-[0-9]{1,50}",
handler: function(w)
{
w.outputText(createExternalLink(w.output,"http://www.bug.com\\"+w.matchText),w.matchStart,w.nextMatch);
}
},
With the "ww.bug.com" part replaced with the url you want.
into the "//-- Standard formatters" section of the core.
Well also changing this in the "// Basic regular expressions" section of
the core:
lowerLetter: "[a-z0-9_\\-\u00df-\u00ff\u0151\u0171]",
lowerLetter: "[a-z0-9_\u00df-\u00ff\u0151\u0171]",
This prevents the system from counting the "-" as part of a WikiLink.
Note: This well break all WikiWords that use a "-".
On Monday, June 10, 2013 7:12:16 AM UTC-7, Marc Stober wrote:
>
> Hi,
>
> Is there a way to recognize a specific regular expression as a specific
> different hyperlink?
>
> Specifically, my company has a bug tracking system with issue numbers like
> AA-123456 (two letter, a dash, and numbers) and I'd like to have anything
> matching that pattern automatically turn into a link like
> http://jira.mycompany.com/AA-123456.
>
> (I'm on version 2.7.0 although if I need to upgrade I can do so.)
>
> Thanks in advance, Marc
>
>
>
--
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 http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.