mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
HTML: Add notes variable to the JSON file even if notes don't exist
if dive notes don't exist, notes variable must be added to the javascript containing empty value "--", this is more friendly than just showing 'undefined' Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7fabeda184
commit
f46b6f6ee2
1 changed files with 4 additions and 2 deletions
|
@ -114,11 +114,13 @@ void put_HTML_quoted(struct membuffer *b, const char *text)
|
|||
|
||||
void put_HTML_notes(struct membuffer *b, struct dive *dive, const char *pre, const char *post)
|
||||
{
|
||||
put_string(b, pre);
|
||||
if (dive->notes) {
|
||||
put_string(b, pre);
|
||||
put_HTML_quoted(b, dive->notes);
|
||||
put_string(b, post);
|
||||
} else {
|
||||
put_string(b, "--");
|
||||
}
|
||||
put_string(b, post);
|
||||
}
|
||||
|
||||
void put_HTML_time(struct membuffer *b, struct dive *dive, const char *pre, const char *post)
|
||||
|
|
Loading…
Reference in a new issue