Indeed, MediaWiki API does not allow to extract a specified section of a specified WP article. And it would probably not be reasonable to process the whole WP article to extract the linked section.
The main issue with hashes in WP is that they are language-specific, whereas we support Wikidata items which links to the corresponding WP article for each language. For example, check https://musicbrainz.org/work/2fbaaf2d-deff-46fb-ac15-ac76e9e56eca/ and change MB UI language.
At best, we can stop displaying Wiki page intro when linked WP URL ends with an hash.
As for blocking anchors in WP URLs, it would be a STYLE (and then an MBS “URL cleanup”) issue.
Indeed, MediaWiki API does not allow to extract a specified section of a specified WP article. And it would probably not be reasonable to process the whole WP article to extract the linked section.
The main issue with hashes in WP is that they are language-specific, whereas we support Wikidata items which links to the corresponding WP article for each language. For example, check https://musicbrainz.org/work/2fbaaf2d-deff-46fb-ac15-ac76e9e56eca/ and change MB UI language.
At best, we can stop displaying Wiki page intro when linked WP URL ends with an hash.
As for blocking anchors in WP URLs, it would be a STYLE (and then an MBS “URL cleanup”) issue.