dmlc / xgboost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow
https://xgboost.readthedocs.io/en/stable/
Apache License 2.0
25.78k stars 8.69k forks source link

[R] Docs for function arguments format second paragraph as code block #10329

Open david-cortes opened 1 month ago

david-cortes commented 1 month ago

In a previous PR for R documentation: https://github.com/dmlc/xgboost/pull/9906

The roxygen options were changed to use markdown mode in all docs.

After this change, some docs that have multiple paragraphs are incorrectly putting everything beyond the first paragraph into a code section, such as argument base_margin in xgb.DMatrix: https://github.com/dmlc/xgboost/blob/9def441e9a1afc6a1b4852f394399093dbcf976c/R-package/man/xgb.DMatrix.Rd#L99

Changing back to non-markdown mode solves the issue (e.g. by adding @noMd), but it's unfortunately not possible to do this only for one function argument, only for a whole .Rd file, so not sure how to solve this.

The affected files can be found by searching for something like this in the man/ folder:

\if{html}{\out{<div class="sourceCode">}}\preformatted{

CC @mayer79

mayer79 commented 1 month ago

IMHO we should continue switching to the modern style. I can dedicate more time into this, but some help would be greatly appreciated (sooo much docu...).

Formatting issues like the one you have identified can be fixed, I am pretty sure.

trivialfis commented 1 month ago

but some help would be greatly appreciated

Feel free to ping me if there's anything I can help.