]> git.scottworley.com Git - tablify/blobdiff - src/lib.rs
Release 0.5.0
[tablify] / src / lib.rs
index 859b3c19157d11b1e003165bbc7a72249641fc62..d85de02dda58b9cbbe1d077d5bd485851d255946 100644 (file)
@@ -322,14 +322,14 @@ fn render_cell(col: &str, row: &mut Row) -> HTML {
             Some(content) => content == "×",
         }),
     };
             Some(content) => content == "×",
         }),
     };
-    let class = HTML::from(if is_empty { "" } else { "yes" });
+    let class = HTML::from(if is_empty { "" } else { r#" class="yes""# });
     let contents = match instances {
         None => HTML::from(""),
         Some(is) => render_instances(is),
     };
     row.entries.remove(col);
     HTML(format!(
     let contents = match instances {
         None => HTML::from(""),
         Some(is) => render_instances(is),
     };
     row.entries.remove(col);
     HTML(format!(
-        r#"<td class="{class}" onmouseover="h2('{row_label}','{col_label}')" onmouseout="ch2('{row_label}','{col_label}')">{contents}</td>"#
+        r#"<td{class} onmouseover="h2('{row_label}','{col_label}')" onmouseout="ch2('{row_label}','{col_label}')">{contents}</td>"#
     ))
 }
 
     ))
 }
 
@@ -697,7 +697,7 @@ mod tests {
                 }
             ),
             HTML::from(
                 }
             ),
             HTML::from(
-                r#"<td class="" onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')"></td>"#
+                r#"<td onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')"></td>"#
             )
         );
         assert_eq!(
             )
         );
         assert_eq!(
@@ -709,7 +709,7 @@ mod tests {
                 }
             ),
             HTML::from(
                 }
             ),
             HTML::from(
-                r#"<td class="" onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')"></td>"#
+                r#"<td onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')"></td>"#
             )
         );
         assert_eq!(
             )
         );
         assert_eq!(
@@ -772,7 +772,7 @@ mod tests {
                 }
             ),
             HTML::from(
                 }
             ),
             HTML::from(
-                r#"<td class="" onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')">×</td>"#
+                r#"<td onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')">×</td>"#
             )
         );
         assert_eq!(
             )
         );
         assert_eq!(
@@ -882,7 +882,7 @@ mod tests {
                 })
             ),
             HTML::from(
                 })
             ),
             HTML::from(
-                r#"<tr><th id="nope">nope</th><td class="" onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')"></td><td class="leftover" onmouseover="highlight('nope')" onmouseout="clear_highlight('nope')">bar</td></tr>
+                r#"<tr><th id="nope">nope</th><td onmouseover="h2('nope','foo')" onmouseout="ch2('nope','foo')"></td><td class="leftover" onmouseover="highlight('nope')" onmouseout="clear_highlight('nope')">bar</td></tr>
 "#
             )
         );
 "#
             )
         );