Exactly the same as `table_of_comparison`, but with a different title for the second column.
(prql: &str, message: &str)
| 192 | |
| 193 | // Exactly the same as `table_of_comparison`, but with a different title for the second column. |
| 194 | fn table_of_error(prql: &str, message: &str) -> String { |
| 195 | format!( |
| 196 | r#" |
| 197 | |
| 198 | <div class="comparison"> |
| 199 | |
| 200 | <div> |
| 201 | <h4>PRQL</h4> |
| 202 | |
| 203 | ```prql |
| 204 | {prql} |
| 205 | ``` |
| 206 | |
| 207 | </div> |
| 208 | |
| 209 | <div> |
| 210 | <h4>Error</h4> |
| 211 | |
| 212 | <pre><code class="hljs language-undefined">{message}</code></pre> |
| 213 | |
| 214 | </div> |
| 215 | |
| 216 | </div> |
| 217 | "#, |
| 218 | prql = prql.trim(), |
| 219 | message = message, |
| 220 | ) |
| 221 | .to_string() |
| 222 | } |
| 223 | |
| 224 | #[test] |
| 225 | fn test_replace_examples() -> Result<()> { |