e.g. [[media:Foo.pdf#page=3]] should link to third page (assuming pdf client supports that). Currently the fragment identifier is stripped [If in legacy fragment mode, that would also break the link, but that's a separate issue]
Anyone wanting to fix this, you probably need to:
- Adjust Linker::makeMediaLinkFile so that it takes the fragment from $title (e.g. See Title::getFragment or Title::getFragmentForUrl) (but keeps taking the rest of the url from $file). You do not want to add the fragment in the broken case.
- Since this is not linking to a wikipage (or even html), an argument could be made that you shouldn't use Title::getFragmentForUrl(), but instead just use Title::getFragment(), as for other media types, fragments should basically be opaque blobs that could be anything (See https://en.wikipedia.org/wiki/Fragment_identifier#Examples ).
- After fixing this, you should add additional parser tests in tests/parser/parserTests.txt (more details)