Open rowild opened 4 years ago
The template attributes seem to be the issue - example, {f:if(condition: item.children, then:'aria-haspopup="true" aria-expanded="false"')}
.
The "unformatted_content_delimiter": "f:if"
won't cover this really, sorry. What really needs to happen is adding a tokenizer for "Fluid" templating to https://github.com/beautify-web/js-beautify/blob/master/js/src/core/templatablepattern.js .
Description
This example uses a tempalte engine called "Fluid", which is the standard template engine if the TYPO3 CMS. It uses XML-like tags, alls starting with "<f:[function]>". js-beautify seems to have troubles with these in some cases.
While trying out the "unformatted_content_delimiter: "f:if", I used the following snippet. The intention was to leave everything untouched within the "f:if" tags, but that seems to be the wrong approach. I used the following scenario, and it was not even a question about using the "unformatted_content_delimiter", but instead it seems to a general probelm:
Input
The code looked like this before beautification:
Current Output
The code actually looked like this after beautification:
Expected Output
The code should be left unchanged / untouched.
Is there anything wrong on my part? Or is this a too complex scenario?
Environment
Browser User Agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36
Language Selected: Beautify HTML
Settings