build(docs-infra): remove {@searchKeywords} from content when rendering (#37132)

Previously this inline-tag-def was returning the `doc` which is rendered
to the output as `[Object Object]` - obviously not what is intended.

Now it returns `''` which effectively strips the tag handler from the
rendered output.

PR Close #37132
This commit is contained in:
Pete Bacon Darwin 2020-05-15 10:00:51 +01:00 committed by Kara Erickson
parent 564ca9e8ec
commit 901db0e730

View File

@ -1,9 +1,9 @@
module.exports = { module.exports = {
name: 'searchKeywords', name: 'searchKeywords',
description: 'A shorthand for creating elements with search terms. Usage: `{@searchKeywords term1 term2 termN }`', description:
'A shorthand for creating elements with search terms. Usage: `{@searchKeywords term1 term2 termN }`',
handler: function(doc, tagName, tagDescription) { handler: function(doc, tagName, tagDescription) {
doc.searchKeywords = tagDescription; doc.searchKeywords = tagDescription;
return doc; return '';
} }
}; };