mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
add missing tr to header generated by map_to_html_table expression function
This commit is contained in:
parent
c22c31cf62
commit
03f967848c
@ -8,8 +8,8 @@
|
||||
"description": "the input map"
|
||||
}],
|
||||
"examples": [{
|
||||
"expression": "map_to_html_table(map('qgis','rocks'))",
|
||||
"returns": "<table><thead><th>qgis</th></thead><tbody><tr><td>rocks</td></tr></tbody></table>"
|
||||
"expression": "map_to_html_table(map('1','one','2','two'))",
|
||||
"returns": "<table><thead><tr><th>1</th><th>2</th></tr></thead><tbody><tr><td>one</td><td>two</td></tr></tbody></table>"
|
||||
}],
|
||||
"tags": ["formatted", "map", "html"]
|
||||
}
|
||||
|
@ -1901,7 +1901,7 @@ static QVariant fcnMapToHtmlTable( const QVariantList &values, const QgsExpressi
|
||||
QString table { R"html(
|
||||
<table>
|
||||
<thead>
|
||||
<th>%1</th>
|
||||
<tr><th>%1</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>%2</td></tr>
|
||||
|
@ -1750,7 +1750,7 @@ class TestQgsExpression: public QObject
|
||||
QTest::newRow( "array_replace (map)" ) << "array_replace(array('APP','SHOULD','ROCK'),map('APP','QGIS','SHOULD','DOES'))" << false << QVariant( QVariantList() << "QGIS" << "DOES" << "ROCK" );
|
||||
|
||||
// map HTML formatting
|
||||
QTest::newRow( "map_to_html_table (map)" ) << "map_to_html_table(map('APP','QGIS','<SHOULD>','DOES'))" << false << QVariant( "\n <table>\n <thead>\n <th><SHOULD></th><th>APP</th>\n </thead>\n <tbody>\n <tr><td>DOES</td><td>QGIS</td></tr>\n </tbody>\n </table>" );
|
||||
QTest::newRow( "map_to_html_table (map)" ) << "map_to_html_table(map('APP','QGIS','<SHOULD>','DOES'))" << false << QVariant( "\n <table>\n <thead>\n <tr><th><SHOULD></th><th>APP</th></tr>\n </thead>\n <tbody>\n <tr><td>DOES</td><td>QGIS</td></tr>\n </tbody>\n </table>" );
|
||||
QTest::newRow( "map_to_html_dl (map)" ) << "map_to_html_dl(map('APP','QGIS','<SHOULD>','DOES'))" << false << QVariant( "\n <dl>\n <dt><SHOULD></dt><dd>DOES</dd><dt>APP</dt><dd>QGIS</dd>\n </dl>" );
|
||||
|
||||
//fuzzy matching
|
||||
|
Loading…
x
Reference in New Issue
Block a user