SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: Marcel on October 04, 2017, 08:44:32 pm

Title: HTML5 coloring and formatting
Post by: Marcel on October 04, 2017, 08:44:32 pm
I am having difficulties getting SE to color and beautify (all settings default) the attached HTML5 fragment. It doesn't color elements like [<div>, <ul>, <li>, <p>] etc, and also doesn't indent them underneath <aside>.  Is there a tag list somewhere that needs to be updated?
Title: Re: HTML5 coloring and formatting
Post by: Clark on October 05, 2017, 02:29:22 am
Color coding looks ok to me. Attached is picture of the color coding I'm seeing for your sample with a default config.

It does look like the default html beautifier profile setting for aside isn't correct. It's Parent Tag setting is "(inline)". Try changing it to "(indented block)" (Tools>Options>Languages>Web Authoring Languages>HTML>Formatting>Click Edit... button, Click on Tags Tab, select the "aside" tag.
Title: Re: HTML5 coloring and formatting
Post by: Dan on October 05, 2017, 01:48:04 pm
Could the mode for the file be wrong?
Title: Re: HTML5 coloring and formatting
Post by: Marcel on October 05, 2017, 01:59:16 pm
Thanks Clark, changing the <aside> declaration worked.

Another question: Frameworks nowadays have hyphenated tags, e.g. <order-processor>. The word definition for HTML does not include the hyphen, so Alt-W only selects 'order'.  I tried to change the character set in HTML general, but that did seem to alter the behavior.
Title: Re: HTML5 coloring and formatting
Post by: Marcel on October 05, 2017, 02:02:39 pm
@Dan: Sorry, I didn't see your question. No, the file mode is HTML.
Title: Re: HTML5 coloring and formatting
Post by: Clark on October 05, 2017, 02:25:04 pm
There's a trick for adding "-" to your word chars. You need to prefix it with backslash (i.e append "\-"). "-" has an additional regular expression meaning. The word chars are thrown into regex brackets everywhere.