g | x | w | all
Bytes Lang Time Link
056Perl 5 + p0l051240607T165602ZDom Hast
125TypeScript’s type system240607T153021Znoodle m
038Pip171220T073257ZDLosc
092PHP170620T214125ZJör
126MATLAB/Octave170619T202634ZTom Carp
05005AB1E170619T193137ZErik the
091Python 3170619T193517Ztotallyh
035V170619T193047ZDJMcMayh
048Retina170619T191624ZETHprodu
085Ruby170619T212958ZValue In
073JavaScript ES6170619T211402ZNeil
101Python 2170619T194318ZRod

Perl 5 + -p0l051, 56 bytes

y/[]//d;s/# (\N+bytes?).+  (\N+).+TIO-.+: /$1: [`$2`](/s

Try it online!

TypeScript’s type system, 125 bytes

type F<S>=S extends`# [${infer L}]${infer S}
${any}    ${infer C}
${any}
[TIO-${any} ${infer T}`?`${L}${S}[\`${C}\`](${T})`:S

Try it at the TS playground

Golfs from trivial solution:

Pip, 43 39 38 bytes

[a@>3DC']": [`"g@-6|>s"`]("(g@v^s1)')]

Try it online!

Takes the lines as separate command-line arguments. An example invocation could look like:

> pip.py -f convert.pip "# [05AB1E], 1 byte" "" "    Ô" "" "[Try it online!][TIO-j3v72bss]" "" "[05AB1E]: https://github.com/Adriandmen/05AB1E" "[TIO-j3v72bss]: https://tio.run/##MzBNTDJM/f//8JT//zNSgSAnJycfDAA \"05AB1E – Try It Online\""

though actually this doesn't work for me because Windows cmd complains about the Ô... [inarticulate muttering]

--At any rate, it works on TIO. Or, use the -r flag and take input from lines of stdin instead.

Assumes that the language name will not contain ] (which would break the markdown anyway).

Explanation

                                        g is list of cmdline args; a is 1st arg;
                                        s is space; v is -1 (implicit)
[                                    ]  Build a list with these elements:
 a@>3                                    1st line, sans first three characters,
     DC']                                 with the ] character deleted
         ": [`"                          This string
               g@-6                      6th line from the end (the code)
                   |>s                    with leading spaces stripped
                      "`]("              This string
                            g@v          Last line (containing the URL)
                               ^s         split on spaces
                           (     1)       get element at index 1
                                   ')    This character
                                        By default, the list is concatenated and printed

PHP, 92 bytes

<?=preg_filter("<...(.+)\](, \d+ \w+).* {4}(\S+).*: (\S+).*>s","$1$2: [`$3`]($4)",$_GET[0]);

Try it online!

MATLAB/Octave, 120 126 bytes

@(a)strjoin(regexprep(strsplit(a,'\n'),{'\[.+\]: (.+) ".+','^[\[<].+','# \[(.+)\](.+)','^ +'},{'`]($1)','','$1$2: [`',''}),'')

This should work. For MATLAB it won't work with Unicode characters though I don't think, mostly because MATLAB sucks when it comes to odd characters. However it will work with Unicode for Octave, or at least TIO seems to be able to cope.

It should also handle submissions both with and without the <-- --> syntax highlighting.

Updates:

  1. Added 4 bytes as I missed the @(a) when copying over
  2. Added 2 bytes to add back ticks around the code in the output

Try it online!

05AB1E, 50 bytes

']¡J¦¦¦|J|`‚ʒнðQ}`ðÛ|D`θ'"Êi\|ë\}θ#1èr"ÿ: [`ÿ`](ÿ)

Try it online!

Now supports syntax highlighting too!

н is replaced by and θ is replaced by ®è since those aren't pulled to TIO yet.

I just wonder how to shorten ¦¦¦...

Python 3, 113 103 98 91 bytes

-1 byte thanks to Value Ink.

If you can, I could totally use some help with the regex. ><

lambda s:re.sub('(?s)# .(.*)](.*?)\n.* {4}(.*?)\n.+: (.*)',r'\1\2: [`\3`](\4)',s)
import re

Try it online!

V, 37, 35 bytes

ç^</dj
H3xf]x3Ji[`A`]Jd2/: 
xr(A)

Try it online!

Retina, 54 48 52 57 48 bytes

Saved 1 byte thanks to @MartinEnder, 1 byte thanks to @Riley

...(.+)[^@]+    (.+)[^@]+: 
$1: [`$2`](
1`]

$
)

Try it online! This assumes there won't be an @ in the language name, which should be fine...

Ruby, 85 bytes

->s{s[/.*/].gsub(/# .|\]/){}+": [`#{s[/(?<=  )\S.*/]}`](#{s=~/TIO-\w+.: (\S+)/;$1})"}

Try it online!

JavaScript (ES6), 73 bytes

f=
s=>s.replace(/...(.*)](.*)[^]+    (.*)[^]+: (.*) ".*/,"$1$2: [`$3`]($4)")
<textarea rows=8 cols=75 oninput=o.textContent=this.value==f(this.value)?``:f(this.value)></textarea><pre id=o>

Python 2, 101 bytes

a=input().split('\n')
print'%s%s: [`%s`](%s)'%tuple(a[0][3:].split(']')+[a[-6][4:],a[-1].split()[1]])

Try it online! or Try all test cases