FlightGear wiki:Village pump: Difference between revisions

Jump to navigation Jump to search
→‎Regex parsing of template parameters?: Named the tag and branch in the examples.
(→‎The repository link templates: Regex parsing of template parameters?)
(→‎Regex parsing of template parameters?: Named the tag and branch in the examples.)
Line 593: Line 593:
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:
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
* Tag <code>version/2016.1.1</code>:  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
* Branch <code>release/2016.1</code>:  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:
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:

Navigation menu