YUI Compressor comments syntax error - yui-compressor

I use YUI Compressor in Symfony2 with assetic bundle.
I have a problem:
If a jquery file start with /* comments I get syntax error....
In order to get rid of it I need to delete all /* comments from all js files...
This is starting to be a problem as everytime I update other bundles the comments are returning.
Anyone have an idea how to sovle this? Is this a known issue?
YUI Compressor version: 2.4.8
Thanks a lot.

Cannot seem to find why this is happening. It is most likely a bug. If you use Dreamweaver, try using this to ease your work. If you are not using dreamweaver, find your favourite program here.
Hope this helps!

Check the encoding on your file. I've had problems with YUI Compressor if my .js and .css files were not UTF-8.

Related

How to format markdown and all code in it?

I have a bunch of markdown files in my github repo. As there are many members in the team, the syntax of markdown and code in markdown files are hard to be standardised.
What I want is:
Create a github action that modify those files automatically when there is a push.
I can't find a markdown prettifier that format the code as well. (e.g. putting spaces around '=')
The solutions that I can think out of are:
Use a CLI tool that can do all the stuff
Use a tool for markdown, use a script to filter all code in it and parse it to anther tool
Send http requests to those online prettifier if such CLI tools do not exist
Note: I have Java, Cpp, Swift and more in my markdown.
Any solution for this? I will be appreciated if the script could be provided (if needed).
Thanks.
If those markdown files are located in a java project, you may try spotless.
For example, if you have a maven project, with spotless, just run mvn spotless:apply, it could fix all the styles / formatting issues of your markdown files automatically.

VSCode Syntax Highlighting not working with Vue / Vetur

For the last week or so, every .VUE file I work with has no syntax highlighting. I usually have the extension Vetur to help with synthax highlighting and other tweaks to .VUE files.
Things I've tried so far:
uninstall/reinstall Vetur
change file associations in VScode
make sure .vue files have no errors
You can install 'Vue 3 Support - All In One' from extensions in vs code. Then the issue with syntax highlighting will fix.
Disable Volar/Vetur extension
Install and enable Vue 3 Support Extension
Reload VSCode
As i see for lang="pug" there is no needs to use other extension as like below:
https://vuejs.github.io/vetur/highlighting.html#custom-block
So I think the problem may be on your project file, please check new vue project to be sure that the problem is not from your files and config of the project !
As Sebastian Brosch said in a reply
This worked for me:
https://github.com/vuejs/vetur/blob/master/docs/FAQ.md#no-syntax-highlighting--no-language-features-working
TLDR: Run command reinstall command in vscode and select vetur extension

Hyphenation doesn´t work with dita-ot 2.5.1 and Apache FOP

I use dita-ot to render to pdf.
Recently, I upgraded from dita-ot 1.8.M2 to 2.5.1
Updating my pdf plugins was quite a bit of work, but the only thing that I don´t get to work properly is hyphenation.
I did it all as described on the Apache website.
The relevant instruction in detail:
"Download the precompiled JAR from OFFO and place it either in the
{fop-dir}/lib directory, or in a directory of your choice (and append
the full path to the JAR to the environment variable
FOP_HYPHENATION_PATH)."
That is how it worked with dita-ot 1.8.M2, where the {fop-dir} was placed in the "org.dita.pdf2" plugin.
Now, {fop-dir} is in the "org.dita.pdf2.fop" plugin. Maybe this is the reason, why "fop-hyph.jar" is obviously not found by the process? But what about the environment variable?
Has anybody a solution?
I found the solution by myself: I just added the attribute <xsl:attribute name="hyphenate">true</xsl:attribute> to the attribute set common.block inside of the attribute file commons-attr.xsl.
I found out that not FOP or the jar file is the cause, when I compared a FO file generated with the old dita-ot (with hyphenation) to a FO file of the new dita-ot. What was missing was the hyphenate=true attribute in each block.
Thanks for your patience!

Is there any Plugin available for VueJs in Netbeans 8.2

Netbeans 8.x intellisense doesn't identify VueJS tags. Is there any Plugin available for VueJs syntax highlighting or autofill support in Netbeans 8.x? If not, are there any work arounds?
.vue file is a kind of html file, you can add syntax highlighting in Netbeans :
Tools > Options > Miscellaneous > Files
Add a new file extension :
File Extension : vue
Associated File Type (MIME) : HTML Files (text/html)
Not perfect but it seems there is no plugin for this actually.
EDIT : Visual Studio Code has nice features for vuejs
There is a plugin but it is still in developtment: https://github.com/Zwaen91/vuejs-netbeans. Some problems with the mixed mimetype text/vue+html. Created a ticket here: https://issues.apache.org/jira/browse/NETBEANS-88
Very Easy Solution:
First time, I also faced this problem when I am working on Netbeans
8.2.x Finally I got solution.
If you opened a PHP Project and if your file's extenstion is .html than NetBeans will display warning. Very easy solution.
replace your .html extension to .php .
Problem will be solve.See Screenshot from my PC's Netbeans.
See my Screenshot, there is no warning. Because, I have used [.]php extension.
Thanks

Check if JS file is included

How can I check if a js file is included in my web page? I had a look of a lot of Selenium Documentations, but i did not find what i want.
Thanks a lot for you reply.
I found the answer of my own question (with the JUnit 3 format):
verifyTrue(selenium.isElementPresent("//script[#type='text/javascript'][contains(#src,'my.js')]"));