FlightGear wiki:Village pump: Difference between revisions

Jump to navigation Jump to search
→‎The repository link templates: Regex parsing of template parameters?
(→‎Welcome template?: There is now an early draft)
(→‎The repository link templates: Regex parsing of template parameters?)
Line 588: Line 588:


:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 06:40, 11 March 2016 (EST)
:::: [[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 06:40, 11 March 2016 (EST)
=== Regex parsing of template parameters? ===
For the {{tl|repo link}} template, I am currently trying to work out what to do for git branches and tags on the SourceForge infrastructure.  The problem is that the presence of the character <code>/</code> within a branch or tag name requires the text <code>/~</code> to be appended to that name in the URL, for example:
* Tag:  https://sourceforge.net/p/flightgear/simgear/ci/version/2016.1.1/~/tree/simgear/ephemeris/ephemeris.cxx
* Branch:  https://sourceforge.net/p/flightgear/simgear/ci/release/2016.1/~/tree/simgear/ephemeris/ephemeris.cxx
I haven't found out a way to use regex to parse the <code>tag</code> or <code>branch</code> template parameters to automate this, hence I am thinking of just giving the instruction for the template user to append this text to the <code>tag</code> or <code>branch</code> parameter text themselves.  However this is not ideal - a change of this behaviour on the SourceForge side requires end pages with SourceForge URLs to be updated, rather than just updating {{tl|repo link}}.  I was wondering about possibility of installing the extension:
* [https://www.mediawiki.org/wiki/Extension:RegexParserFunctions Extension:RegexParserFunctions]
Though I'm not 100% sure if that will work.  Or does someone else know an alternative?  Cheers!
[[User:Bugman|Bugman]] ([[User talk:Bugman|talk]]) 12:09, 22 April 2016 (EDT)


== Discussion about quotes on the wiki ==
== Discussion about quotes on the wiki ==

Navigation menu