Replace space to for HTML Rendering.
Reason: Some javascript frameworks(ex. vue.js) manipulate HTML tags when drawing. At that time, if there is a space-only DOM element, the space in the DOM element is deleted. Before: `` ` <span> </span> `` ` After (space deleted) `` ` <span></span> `` ` In order to avoid this, it has been modified to render with only when there is no diff.
This commit is contained in:
parent
faeb7b7e80
commit
5bf0575b46
2 changed files with 8 additions and 0 deletions
|
|
@ -211,6 +211,10 @@
|
||||||
lineWithoutPrefix = lineWithPrefix.line;
|
lineWithoutPrefix = lineWithPrefix.line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prefix === ' ') {
|
||||||
|
prefix = ' ';
|
||||||
|
}
|
||||||
|
|
||||||
return hoganUtils.render(genericTemplatesPath, 'line',
|
return hoganUtils.render(genericTemplatesPath, 'line',
|
||||||
{
|
{
|
||||||
type: type,
|
type: type,
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,10 @@
|
||||||
lineWithoutPrefix = lineWithPrefix.line;
|
lineWithoutPrefix = lineWithPrefix.line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prefix === ' ') {
|
||||||
|
prefix = ' ';
|
||||||
|
}
|
||||||
|
|
||||||
return hoganUtils.render(genericTemplatesPath, 'line',
|
return hoganUtils.render(genericTemplatesPath, 'line',
|
||||||
{
|
{
|
||||||
type: type,
|
type: type,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue