Skip to content

Commit

Permalink
HTML term index table now creates one id= per cell rather than per te…
Browse files Browse the repository at this point in the history
…rm, fixing an HTML tidy warning.
  • Loading branch information
krivit committed Sep 30, 2022
1 parent 5d5db81 commit 12d1476
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ergm
Version: 4.3-7009
Date: 2022-09-10
Version: 4.3-7049
Date: 2022-09-30
Title: Fit, Simulate and Diagnose Exponential-Family Models for Networks
Authors@R: c(
person("Mark S.", "Handcock", role=c("aut"), email="handcock@stat.ucla.edu"),
Expand Down
5 changes: 4 additions & 1 deletion R/ergm-terms-index.R
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,10 @@ PROPOSAL_NOT_IN_TABLE <- "This proposal is not referenced in the lookup table."
# \link[=absdiff-ergmTerm]{test} and check that it works with \out{<a href="../help/absdiff-ergmTerm">test</a>}.
# This address may change from an upstream R-studio change

df$Term <- sprintf(gsub('`([^`(]*)([^`]*)`', '<span class="code"><a href="../help/%1$s" id="%1$s">\\1\\2</a></span>', .fsub(df$Term, '\n', '<br />\n')), df$Link)
df$Term %<>% .fsub('\n', '<br />\n') %>%
gsub('`([^`(]*)([^`]*)`', '<span class="code"><a href="../help/%1$s">\\1\\2</a></span>', .) %>%
sprintf(df$Link) %>%
sprintf('<div id="%s">%s</div>', df$Link, .)
df$Link <- NULL

css <- '<style>.striped th,.striped td {padding:3px 10px} .striped tbody tr:nth-child(odd) {background: #eee} .striped .code {font-family: monospace} .matrix td {align: center} .matrix th,.matrix td {padding-right:5px; width: 75px}</style>'
Expand Down

0 comments on commit 12d1476

Please sign in to comment.