Added js-doc for formatFunction
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
11d551f8a3
commit
1d63799c9b
1 changed files with 3 additions and 0 deletions
|
@ -28,6 +28,9 @@ export class TextMessageView extends TemplateView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map from part to function that outputs DOM for the part
|
||||||
|
*/
|
||||||
const formatFunction = {
|
const formatFunction = {
|
||||||
text: textPart => text(textPart.text),
|
text: textPart => text(textPart.text),
|
||||||
link: linkPart => tag.a({ href: linkPart.url, target: "_blank", rel: "noopener" }, [linkPart.text]),
|
link: linkPart => tag.a({ href: linkPart.url, target: "_blank", rel: "noopener" }, [linkPart.text]),
|
||||||
|
|
Reference in a new issue