g2384 / VHDLFormatter

VHDL formatter web online written in typescript
https://g2384.github.io/VHDLFormatter/
MIT License
52 stars 20 forks source link

Bug fixes #12

Closed MihaiBabiac closed 5 years ago

MihaiBabiac commented 5 years ago

Hi! I am running the formatting script as a git hook and noticed a couple of issues when the script ran on the fixed_pkg_2008.vhd file from Vivado, as well as on some of my own files. Here are the changes I made to work better and get code more to my liking. Unfortunately the script I had (inherited) was just the .js file from a slightly older version, so that is what I worked with, instead of the latest TypeScript source.

Please let me know what you think!

P.S.: you might not want the "Disable removal of extra lines" commit

g2384 commented 5 years ago

🤔

g2384 commented 5 years ago

wait, you're not a bot? Sorry. Okay, Firstly, the js change will be overwritten by auto-compile, so I need to change .ts files. Secondly, the vhd file is too large. It would be great if it can be shortened. All in all, thans for the contribution. I'll adopt them if they can be improved (by you or by me).

MihaiBabiac commented 5 years ago

No, I'm not a bot :smile: I'll try to see what I can do about the vhd file in the next couple of days. I noticed too late that the .js file was auto-generated, but I think the changes should be easy to move to the .ts file.

How can I best help?

g2384 commented 5 years ago

I've moved most of your work into the ts files already. Apart from the one I commented yesterday.

I've added unit tests. Hence, the VHD file is not needed.

g2384 commented 5 years ago

I've manually merged this PR into master branch. currently \r\n\r\n will still be replaced by \r\n. I may need to create a new setting for this.

MihaiBabiac commented 5 years ago

Thanks! I'll make new (and easier to merge) pull requests if I make any other improvements :slightly_smiling_face: