(de)serialize at-room-pills just like pill-candidate (no html needed)
parent
dfec5058c5
commit
63b11f5001
|
@ -24,6 +24,7 @@ export function mdSerialize(model) {
|
||||||
return html + "\n";
|
return html + "\n";
|
||||||
case "plain":
|
case "plain":
|
||||||
case "pill-candidate":
|
case "pill-candidate":
|
||||||
|
case "at-room-pill":
|
||||||
return html + part.text;
|
return html + part.text;
|
||||||
case "room-pill":
|
case "room-pill":
|
||||||
case "user-pill":
|
case "user-pill":
|
||||||
|
@ -47,6 +48,7 @@ export function textSerialize(model) {
|
||||||
return text + "\n";
|
return text + "\n";
|
||||||
case "plain":
|
case "plain":
|
||||||
case "pill-candidate":
|
case "pill-candidate":
|
||||||
|
case "at-room-pill":
|
||||||
return text + part.text;
|
return text + part.text;
|
||||||
case "room-pill":
|
case "room-pill":
|
||||||
case "user-pill":
|
case "user-pill":
|
||||||
|
@ -58,13 +60,11 @@ export function textSerialize(model) {
|
||||||
export function requiresHtml(model) {
|
export function requiresHtml(model) {
|
||||||
return model.parts.some(part => {
|
return model.parts.some(part => {
|
||||||
switch (part.type) {
|
switch (part.type) {
|
||||||
case "newline":
|
|
||||||
case "plain":
|
|
||||||
case "pill-candidate":
|
|
||||||
return false;
|
|
||||||
case "room-pill":
|
case "room-pill":
|
||||||
case "user-pill":
|
case "user-pill":
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue