Skip to content

Commit 3f9be95

Browse files
committed
[md2attr_line] fix some html handling
A couple more postgres_log improvements
1 parent 60b7b14 commit 3f9be95

15 files changed

Lines changed: 283 additions & 203 deletions

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Features:
44
* Initial support for Windows. Configuration should be stored
5-
in %APPDATA%. The binary is built using msys2. So, it
5+
in `%APPDATA%`. The binary is built using msys2. So, it
66
depends on msys-2.0.dll being in the same directory. No other
77
dependencies should be needed.
88
* Removed dependency on ncurses during the build. The terminfo
@@ -14,6 +14,8 @@ Features:
1414
with the statement and a pointer to the location of the error.
1515
* Annotation handlers can now be lnav scripts if the "handler"
1616
field starts with a pipe ("|").
17+
* The `<span>` tag in a markdown now supports
18+
`white-space: nowrap` in the `style` attribute.
1719

1820
Interface changes:
1921
* If all the log messages in the LOG view are hidden, a notice
@@ -24,6 +26,8 @@ Bug Fixes:
2426
* Fix a crash on startup for some environments.
2527
* Fix a spurious screen flash on some prompts.
2628
* Fix an issue with completion of script names.
29+
* Handle abbreviated timezones (e.g. PDT/PST) in timestamps.
30+
* Improve HTML handling in Markdown files.
2731

2832
## lnav v0.13.0
2933

src/db_sub_source.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ db_label_source::get_row_as_string(vis_line_t row)
842842
retval.append(hm.hm_name);
843843
retval.push_back('=');
844844
auto sf = cursor->to_string_fragment(this->dls_cell_allocator);
845-
retval.append(sf.data(), sf.length());
845+
retval += sf;
846846

847847
cursor = cursor->next();
848848
lpc += 1;

src/formats/postgres_log.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Format for PostgreSQL logs",
66
"regex": {
77
"std": {
8-
"pattern": "(?<timestamp>^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}(\\.\\d{3})? \\S+) \\[(?<pid>[\\d\\-]+)\\](?<host>\\s+\\[[^\\]]+\\])?(?:\\s+(?<user>[^@]+)@(?<db_name>\\S+))? (?<level>DEBUG\\d?|DETAIL|CONTEXT|INFO|NOTICE|WARNING|ERROR|LOG|FATAL|PANIC|STATEMENT):\\s+(?<body>.*)$"
8+
"pattern": "(?<timestamp>^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}(\\.\\d{3})? \\S+) \\[(?<pid>[\\d\\-]+)\\](?<host>\\s+\\[[^\\]]+\\])?(?:\\s+(?<user>[^@]+)@(?<db_name>\\S+))? (?<level>DEBUG\\d?|DETAIL|CONTEXT|INFO|NOTICE|WARNING|ERROR|LOG|FATAL|PANIC|STATEMENT): *(?<body>.*)$"
99
}
1010
},
1111
"value": {

src/logfile.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,7 @@ logfile::read_full_message(const_iterator ll,
14641464
if (format == read_format_t::plain && mlr.mlr_line_count > 1
14651465
&& this->lf_line_buffer.is_piper())
14661466
{
1467+
this->lf_plain_msg_shared.invalidate_refs();
14671468
this->lf_plain_msg_buffer.expand_to(mlr.mlr_length);
14681469
this->lf_plain_msg_buffer.clear();
14691470
auto curr_ll = ll;
@@ -1491,7 +1492,6 @@ logfile::read_full_message(const_iterator ll,
14911492

14921493
++curr_ll;
14931494
} while (curr_ll != this->end() && curr_ll->is_continued());
1494-
this->lf_plain_msg_shared.invalidate_refs();
14951495
msg_out.share(this->lf_plain_msg_shared,
14961496
this->lf_plain_msg_buffer.data(),
14971497
this->lf_plain_msg_buffer.size());

0 commit comments

Comments
 (0)