The canonical input/<name>/<name>.md is Markdown. Rust's target is Markdown too, so rustdoc renders it. Java's target is HTML and C#'s is XML, and their emitters convert only part of it — so the rest ships to users as literal punctuation, in the published javadoc, the NuGet XML docs, and every IDE hover.
Two independent causes, both measured on dev at e63a7218b.
1. ## Formula welds its trailing prose into the code block
parser::doc_md::split_formula_note separates the formula from the sentence after it only when the section carries a closing $$. Across the corpus, 2 of 150 ## Formula sections do. For the other 148 the whole section — formula and every prose paragraph under it — is handed to the emitters as preformatted text.
62 lines land inside <pre>{@code} in Core.java, and 62 inside <code> in the C# sources, across 22 indicators: ADR ADX APO ATR CMOU COPPOCK CUMSUM DPO EFI EMA ER ERI FRACTAL MIDPRICE PPO PVO QSTICK RVI VHF VORTEX VWMA WAD.
Core.java, COPPOCK:
* <p><b>Formula</b>
* <pre>{@code
* `COPPOCK = WMA(ROC(optInROC1Period) + ROC(optInROC2Period), optInWMAPeriod)`
* Each ROC carries [`ROC`](/functions/roc)'s own zero guard — a zero price `optInROC*Period` bars back yields 0.0 …
* The formula is symmetric in the two ROC periods and the lookback keys off their max, so `optInROC1Period > …
* The classic defaults are 11/14/10 on monthly data. Wikipedia's daily-scale variant (231/294-bar ROC, 210-bar …
* }</pre>
Three prose paragraphs as code, the formula keeping its literal backticks, and a Markdown link as text. The same source renders correctly on ta-lib.org (website/src/functions/coppock.md), which is what says the .md is right and the emitters are wrong.
This is also why 6 Markdown links survived the conversion added in #386 (e46e97c0a): they sit inside the formula block, which never reaches jdoc/csdoc. COPPOCK, ERI and VORTEX, x2 overloads.
2. Markdown emphasis ships literally into ordinary prose
jdoc and csdoc convert backtick spans and (since e46e97c0a) inline links. They do not convert **bold** or *italic*, so those reach the reader as asterisks — this time outside any code block, in summaries and notes.
|
**bold** |
*italic* |
Java Core.java |
16 |
39 |
C# Core_*.cs |
16 |
38 |
e.g. weighted moving average of the **sum** of two rates of change and how far price travels *within* a bar.
Rust's counts are non-zero too and are correct — rustdoc renders Markdown. Only the HTML and XML targets need the conversion.
Nothing catches either
Measured, not assumed: javadoc -Xdoclint:all,-missing (the setting pom.xml enforces) and csc under TreatWarningsAsErrors + GenerateDocumentationFile both accept literal Markdown without a diagnostic. regen-check only pins that the committed output matches the emitter, so it agrees with whatever is emitted. This is the same blind spot #386 hit with links, where Rust was clean only because rustdoc's bare_urls lint made a stranded URL a build failure.
What a fix has to decide
split_formula_note needs a second delimiter form — a formula line followed by a blank line and prose. That changes what 148 functions render as a formula in four backends, so it wants its own before/after diff review rather than being folded into a doc-emitter change.
- Emphasis conversion is local to
jdoc/csdoc (<b>/<i>), and is the smaller half. It can land independently.
- Rust must not change: it already receives Markdown and wants it.
Guard the result with a unit test on the escapers plus a corpus assertion that no rendered Java/C# doc line carries **, ](, or a stray backtick outside a code block — nothing else can see this class.
The canonical
input/<name>/<name>.mdis Markdown. Rust's target is Markdown too, so rustdoc renders it. Java's target is HTML and C#'s is XML, and their emitters convert only part of it — so the rest ships to users as literal punctuation, in the published javadoc, the NuGet XML docs, and every IDE hover.Two independent causes, both measured on
devate63a7218b.1.
## Formulawelds its trailing prose into the code blockparser::doc_md::split_formula_noteseparates the formula from the sentence after it only when the section carries a closing$$. Across the corpus, 2 of 150## Formulasections do. For the other 148 the whole section — formula and every prose paragraph under it — is handed to the emitters as preformatted text.62 lines land inside
<pre>{@code}inCore.java, and 62 inside<code>in the C# sources, across 22 indicators: ADR ADX APO ATR CMOU COPPOCK CUMSUM DPO EFI EMA ER ERI FRACTAL MIDPRICE PPO PVO QSTICK RVI VHF VORTEX VWMA WAD.Core.java, COPPOCK:Three prose paragraphs as code, the formula keeping its literal backticks, and a Markdown link as text. The same source renders correctly on ta-lib.org (
website/src/functions/coppock.md), which is what says the.mdis right and the emitters are wrong.This is also why 6 Markdown links survived the conversion added in #386 (
e46e97c0a): they sit inside the formula block, which never reachesjdoc/csdoc. COPPOCK, ERI and VORTEX, x2 overloads.2. Markdown emphasis ships literally into ordinary prose
jdocandcsdocconvert backtick spans and (sincee46e97c0a) inline links. They do not convert**bold**or*italic*, so those reach the reader as asterisks — this time outside any code block, in summaries and notes.**bold***italic*Core.javaCore_*.cse.g.
weighted moving average of the **sum** of two rates of changeandhow far price travels *within* a bar.Rust's counts are non-zero too and are correct — rustdoc renders Markdown. Only the HTML and XML targets need the conversion.
Nothing catches either
Measured, not assumed:
javadoc -Xdoclint:all,-missing(the settingpom.xmlenforces) andcscunderTreatWarningsAsErrors+GenerateDocumentationFileboth accept literal Markdown without a diagnostic.regen-checkonly pins that the committed output matches the emitter, so it agrees with whatever is emitted. This is the same blind spot #386 hit with links, where Rust was clean only because rustdoc'sbare_urlslint made a stranded URL a build failure.What a fix has to decide
split_formula_noteneeds a second delimiter form — a formula line followed by a blank line and prose. That changes what 148 functions render as a formula in four backends, so it wants its own before/after diff review rather than being folded into a doc-emitter change.jdoc/csdoc(<b>/<i>), and is the smaller half. It can land independently.Guard the result with a unit test on the escapers plus a corpus assertion that no rendered Java/C# doc line carries
**,](, or a stray backtick outside a code block — nothing else can see this class.