Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If custom HTML tag contains uppercase then auto completion values wont show #14

Open
nickisghosty opened this issue Aug 28, 2020 · 0 comments

Comments

@nickisghosty
Copy link

So I'm current;y writing an extension to bring CouchCMS custom html tag support into VSCode with hover and auto completion with snippet style attributes. All is going well until I got to this tag

<cms:excerptHTML />

I wrote the customData as I did for every other tag before, literally almost exactly the same as the tag that came before it,

 <cms:excerpt />

went to test it to make sure I didn't have any typos and the auto completion "attributes" didn't show at the top of the auto completion list when triggered via "Ctrl + Space". Played around with the tag and found if I remove the uppercase from the tag and make it lower case it works as expected. Here is what I have in the customData file for that tag:

  {
            "name": "cms:excerptHTML",
            "description": "```html \n <cms:excerptHTML count='130' ignore='img'> \n ```\n===========\n\n\nThe **excerptHTML** tag can be used to create an excerpt of any HTML content that is enclosed within its opening and closing tags.  \n\nUnlike the **excerpt** tag, excerptHTML preserves the HTML formatting of the truncated contents (except for the HTML tags specified in its *ignore* parameter).\n\n\nExamples -\n\n\n\n ```html \n<cms:excerptHTML><cms:show content /></cms:excerptHTML>\n\n ``` \n\n ```html \n<cms:excerptHTML count='130' ignore='img'>\n <cms:show content />\n</cms:excerptHTML>\n\n ``` \nThe snippets are outputting an excerpt of the value contained within the *content* variable.\n\n\nParameters\n----------\n\n\n\n\n* count\n\n* ignore\n\n* trail\n\n\n\n### count\n\n\nThe maximum number of words that the excerpt can contain. The default value is 50 words.\n\n\n### ignore\n\n\nThe HTML elements to weed out of the excerpt. For example, you might not want to have any images in the excerpt.  \n\nIf you wish to ignore multiple tags, separate the tagnames by using comma e.g.\n\n\n\n ```html \nignore='img, table'\n\n ``` \n### trail\n\n\nBy default the produced excerpt is appended with '...' (three ellipses). You can change this by using this parameter.\n\n\n\n ```html \n<cms:excerptHTML trail=\"&nbsp;(<a href=\"<cms:show k_page_link />\">read more..</a>)\"><cms:show blog_content /></cms:excerptHTML>\n\n ``` \nThe snippet above will append a '*read more..*' link leading to the page-view of the item being shown in excerpted form.\n\n\nVariables\n---------\n\n\nThis tag does not set any variables of its own.\n\n\nRelated Tags\n------------\n\n\n\n\n* [excerpt](excerpt.html)\n\n\n\n'",
            "attributes": [
                {
                    "name": "${count:count}='${1:50}'",
                    "description": "The maximum number of words/characters that the excerpt can contain. The default value is 50.  \n By default, this parameter is applied to the number of words in the excerpt.  \n By setting the 'truncate_chars' parameter (see below) to '1', it can be made to apply to the number of characters in the excerpt instead.\n\n",
                    "valueSet": "v"
                },
                {
                    "name": "${ignore:ignore}='${1:table, span, img}'",
                    "description": "The HTML elements to weed out of the excerpt. For example, you might not want to have any images in the excerpt.  \n If you wish to ignore multiple tags, separate the tagnames by using comma e.g.\n\n\n ```html \nignore='img, table' \n ``` \n",
                    "valueSet": "v"
                },
                {
                    "name": "${trail:trail}='${1:...}'",
                    "description": "By default the produced excerpt is appended with '...' (three ellipses). You can change this by using this parameter.\n\n\n ```html \n<cms:excerptHTML trail=\"&nbsp;(<a href=\"<cms:show k_page_link />\">read more..</a>)\"><cms:show blog_content /></cms:excerptHTML> \n ``` \nThe snippet above will append a '*read more..*' link leading to the page-view of the item being shown in excerpted form.\n\nVariables\n---------\n\nThis tag does not set any variables of its own.",
                    "valueSet": "v"
                }
            ]
        },

Is there any way to make the uppercase work? The tag is case sensitive so I cant just make it lowercase.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant