Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vignettes: avoid using _ or . in header IDs #6784

Merged
merged 3 commits into from
Feb 2, 2025
Merged

Conversation

aitap
Copy link
Contributor

@aitap aitap commented Jan 31, 2025

"Introduction to data.table" on CRAN seems to be the only vignette affected:

<h3 id="h-great-but-how-can-i-refer-to-columns-by-names-in-j-like-in-a-data-frame" #refer_j>h) Great! But how can I refer to columns by names in <code>j</code> (like in a <code>data.frame</code>)?</h3>

<h4 id="how-can-we-calculate-the-number-of-trips-for-each-origin-airport-for-carrier-code-quot-aa-quot" #origin-.N>– How can we calculate the number of trips for each origin airport for carrier code <code>&quot;AA&quot;</code>?</h4>

<h4 id="how-can-we-get-the-total-number-of-trips-for-each-origin-dest-pair-for-carrier-code-quot-aa-quot" #origin-dest-.N>– How can we get the total number of trips for each <code>origin, dest</code> pair for carrier code <code>&quot;AA&quot;</code>?</h4>

As a result, the links to these headers don't work.

data.table-intro on CRAN:

<h3 id="h-great-but-how-can-i-refer-to-columns-by-names-in-j-like-in-a-data-frame" #refer_j>h) Great! But how can I refer to columns by names in <code>j</code> (like in a <code>data.frame</code>)?</h3>

<h4 id="how-can-we-calculate-the-number-of-trips-for-each-origin-airport-for-carrier-code-quot-aa-quot" #origin-.N>– How can we calculate the number of trips for each origin airport for carrier code <code>&quot;AA&quot;</code>?</h4>

<h4 id="how-can-we-get-the-total-number-of-trips-for-each-origin-dest-pair-for-carrier-code-quot-aa-quot" #origin-dest-.N>– How can we get the total number of trips for each <code>origin, dest</code> pair for carrier code <code>&quot;AA&quot;</code>?</h4>

This is not valid HTML and the links to these headers don't work.
"Intro" seems to be the only vignette affected.
@aitap aitap requested a review from MichaelChirico as a code owner January 31, 2025 11:19
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.60%. Comparing base (32dfd8d) to head (2916c6c).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6784   +/-   ##
=======================================
  Coverage   98.60%   98.60%           
=======================================
  Files          79       79           
  Lines       14642    14642           
=======================================
  Hits        14438    14438           
  Misses        204      204           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichaelChirico
Copy link
Member

Want to have a go at writing a simple grep() linter for this under code-quality/lint-md?

https://github.com/Rdatatable/data.table/tree/master/.ci/linters/md

Copy link
Member

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge before/after adding a linter; if you'd rather punt on the linter, please file a follow-up.

aitap added 2 commits February 2, 2025 22:21
This doesn't parse the full range of Pandoc's header_attributes
extension (one shouldn't be using regular expressions for that), but at
least it captures the existing mistakes without obvious false positives.
@aitap
Copy link
Contributor Author

aitap commented Feb 2, 2025

Pardonnez-moi @Rdatatable/french, I hope you don't mind me fixing the heading ids and the links without changing the text.

@aitap aitap merged commit 50e056f into master Feb 2, 2025
10 checks passed
@aitap aitap deleted the vignette-header-ids branch February 2, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants