Update query parser to properly display multi-line content (#1007)

This commit is contained in:
toasted-nutbread 2020-11-08 12:43:41 -05:00 committed by GitHub
parent 12e6e37785
commit 948605a1fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,7 @@ class QueryParserGenerator {
termNode.className = 'query-parser-term';
termNode.dataset.type = type;
for (const segment of term) {
if (!segment.text.trim()) { continue; }
if (!segment.reading.trim()) {
if (segment.reading.trim().length === 0) {
this._addSegmentText(segment.text, termNode);
} else {
termNode.appendChild(this._createSegment(segment));

View File

@ -190,6 +190,7 @@ h2 {
#query-parser-content {
margin-top: 0.5em;
font-size: 2em;
white-space: pre-wrap;
}
#query-parser-content[data-term-spacing=true] .query-parser-term {