Expand description
Markup rules — mirrors journals/jss/rules/markup.py
(JSS-MARKUP-001..004). The noisiest, most heuristic-laden rule
module in the Python codebase (per the porting plan).
Offset convention (see individual helper doc comments for the ones
that matter): helpers taking chars: &str operate on a single
CharsNode’s own text using regex BYTE offsets directly as an
approximation of Python’s codepoint offsets — the same accepted
approximation abbreviations.rs::looks_like_author_initial already
uses (only wrong in the presence of non-ASCII text within the
lookback/lookahead window, validated clean by the fixture sweep).
Helpers taking source: &[char] (the whole document) and an
abs_pos/abs_end always use exact codepoint offsets, matching
Fix/Violation position units — those abs_pos values are
computed via the established c.span.pos + c.chars[..byte_off] .chars().count() conversion before being passed in.
Functions§
- check_
markup_ 001 - JSS-MARKUP-001 — programming-language names wrapped in
\proglang{}. - check_
markup_ 002 - JSS-MARKUP-002 — software-package names wrapped in
\pkg{}. - check_
markup_ 003 - JSS-MARKUP-003 — inline function/argument names and bare R
sentinel values wrapped in
\code{};\texttt{}retargeted to the appropriate JSS markup macro. - check_
markup_ 004 - JSS-MARKUP-004 — section titles with markup supply a plain-text
optional arg:
\section[plain]{markup}.