Expand description
Plain text from publisher metadata strings that carry inline markup.
Crossref serves titles as the publisher deposited them, and several publishers deposit JATS / MathML inline elements pretty-printed onto their own lines (#609):
"Recent developments in the P\n <scp>y</scp>\n SCF program package"Stripping the tags is not enough. The newline-plus-indent runs around an
inline element were added by the pretty-printer, so they say nothing about
whether the author wrote a space there: P<scp>y</scp>SCF is one word,
in <i>γ</i>-InSe is two. plain_title decides each such run from its
neighbours; the rules are pinned against real deposits in the tests below.
Whitespace that is not a pretty-printer run (no line break, or no tag
beside it) collapses to one space, and $...$ is left alone: a
hand-written TeX title is content, which doiget lint already treats as
intentional.
Functions§
- has_
inline_ markup - Whether
scarries a line break or an inline markup tag, i.e. whetherplain_titlewould rewrite more than entities.doiget lintuses this to find entries pasted from an olderdoiget cite(#609). - plain_
title rawwith inline markup reduced to its text content, XML entities decoded and whitespace collapsed. A string with no tag, entity or line break is returned unchanged.