@@ -170,7 +170,7 @@ impl RHtmlHelp {
170
170
/// <h3>Arguments</h3>
171
171
///
172
172
/// <table>
173
- /// <tr style="vertical-align: top;" ><td><code>parameter</code></td>
173
+ /// <tr><td><code>parameter</code></td>
174
174
/// <td>
175
175
/// Parameter documentation.
176
176
/// </td></tr>
@@ -212,7 +212,7 @@ impl RHtmlHelp {
212
212
213
213
// Get the cells in this table.
214
214
// I really wish R included classes on these table elements...
215
- let selector = Selector :: parse ( r#"tr[style="vertical-align: top;"] > td"# ) . unwrap ( ) ;
215
+ let selector = Selector :: parse ( r#"tr > td"# ) . unwrap ( ) ;
216
216
let mut cells = elt. select ( & selector) ;
217
217
218
218
// Start iterating through pairs of cells.
@@ -371,6 +371,8 @@ fn for_each_section(doc: &Html, mut callback: impl FnMut(ElementRef, Vec<Element
371
371
372
372
#[ cfg( test) ]
373
373
mod tests {
374
+ use tower_lsp:: lsp_types:: MarkupKind ;
375
+
374
376
use crate :: lsp:: help:: RHtmlHelp ;
375
377
use crate :: lsp:: help:: Status ;
376
378
use crate :: r_task;
@@ -406,6 +408,12 @@ mod tests {
406
408
407
409
let markdown = help. markdown ( ) . unwrap ( ) ;
408
410
markdown. contains ( "### Usage" ) ;
411
+
412
+ let markdown = help. parameter ( "x" ) . unwrap ( ) . unwrap ( ) ;
413
+ assert_eq ! ( markdown. kind, MarkupKind :: Markdown ) ;
414
+ assert ! ( markdown. value. contains( "vector or `NULL`" ) ) ;
415
+
416
+ assert ! ( help. parameter( "not_a_parameter" ) . unwrap( ) . is_none( ) ) ;
409
417
} ) ;
410
418
}
411
419
0 commit comments