# The parsoid-compatible option below is only relevant when we are running # parser tests in integrated mode with Parsoid. This option is ignored # when this test file is run with Parsoid in standalone mode. !! options parsoid-compatible=wt2html,wt2wt version=2 !! end !! test Magic links: internal link to RFC (T2479) !! wikitext [[RFC 123]] !! html/php

RFC 123

!! html/parsoid

RFC 123

!! end !! test Magic links: RFC (T2479) !! wikitext RFC 822 !! html/php

RFC 822

!! html/parsoid

RFC 822

!! end !! test Magic links: RFC (T67278) !! wikitext This is RFC 822 but thisRFC 822 is not RFC 822linked. !! html/php

This is RFC 822 but thisRFC 822 is not RFC 822linked.

!! html/parsoid

This is RFC 822 but thisRFC 822 is not RFC 822linked.

!! end !! test Magic links: RFC (w/ non-newline whitespace, T30950/T31025) !! wikitext RFC       822 RFC 822 !! html/php

RFC 822 RFC 822

!! html/parsoid

RFC       822 RFC 822

!! end !! test Magic links: ISBN (T3937) !! wikitext ISBN 0-306-40615-2 !! html/php

ISBN 0-306-40615-2

!! html/parsoid

ISBN 0-306-40615-2

!! end !! test Magic links: ISBN (T67278) !! wikitext This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked. !! html/php

This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.

!! html/parsoid

This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.

!! end !! test Magic links: ISBN (w/ non-newline whitespace, T30950/T31025) !! wikitext ISBN       978 0 316 09811 3 ISBN 9780316098113 ISBN 978 0316098113 !! html/php

ISBN 978 0 316 09811 3 ISBN 9780316098113 ISBN 978 0316098113

!! html/parsoid

ISBN       978 0 316 09811 3 ISBN 9780316098113 ISBN 978 0316098113

!! end !! test Magic links: PMID incorrectly converts space to underscore !! wikitext PMID 1234 !! html/php

PMID 1234

!! html/parsoid

PMID 1234

!! end !! test Magic links: PMID (T67278) !! wikitext This is PMID 1234 but thisPMID 1234 is not PMID 1234linked. !! html/php

This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.

!! html/parsoid

This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.

!! end !! test Magic links: PMID (w/ non-newline whitespace, T30950/T31025) !! wikitext PMID       1234 PMID 1234 !! html/php

PMID 1234 PMID 1234

!! html/parsoid

PMID       1234 PMID 1234

!! end # nodes shouldn't be inserted during html2wt by Parsoid, # since these are ExtLinkText, not MagicLinkText !! test Magic links: use appropriate serialization for "almost" magic links. !! wikitext X[[Special:BookSources/0978739256|foo]] X[https://tools.ietf.org/html/rfc1234 foo] !! html/php

Xfoo

Xfoo

!! html/parsoid

Xfoo

Xfoo

!! end # Parsoid fails this test !! test Magic links: All disabled (T47942) !! options wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false} !! wikitext ISBN 0-306-40615-2 PMID 1234 RFC 4321 !! html

ISBN 0-306-40615-2 PMID 1234 RFC 4321

!! end