You are here: PSPad forum > English discussion forum > Re: Multi-Highlighter Quirk / requests

Re: Multi-Highlighter Quirk / requests

#1 Multi-Highlighter Quirk / requests

Posted by: xaos | Date: 2013-08-27 19:50 | IP: IP Logged

The quirk ..

With php embedded in an html tag after an opening quote .. like so ..

<a href="?where=<?php echo $there,">',$there,'?> </a>

.. the html highlighting following the closing php tag ends up broken until it runs into another quote. Not sure it's fixable but wasn't able to find it mentioned anywhere else.

The reqeust..
Would it be possible to add an option not to highlight quoted php variables?

..and.. it seems that the php "Identifiers" color applies to 'all' words that aren't part of the other categories, which seems a little strange.

Options: Reply | Quote | Up ^


#2 Re: Multi-Highlighter Quirk / requests

Posted by: pspad | Date: 2013-08-27 20:13 | IP: IP Logged

I think the HTML multihighlighter works fine for your example

Options: Reply | Quote | Up ^


#3 Re: Multi-Highlighter Quirk / requests

Posted by: xaos | Date: 2013-08-28 04:37 | IP: IP Logged

I suppose I should have used better contrasting colors ... the 'purple' that the quoted value is carries on beyond the closing php tag, where it should instead be blue, like the opening portion of the html tag. Try pasting that portion of code into a document with more html on either side of it, that should make it a little more obvious.

Any thots on the remainder of that first post?

Edited 1 time(s). Last edit at 2013-08-28 04:42 by xaos.

Options: Reply | Quote | Up ^


#4 Re: Multi-Highlighter Quirk / requests

Posted by: hhoefling | Date: 2013-08-28 14:44 | IP: IP Logged

Check your ' and " in sample code.

--
by HH

Options: Reply | Quote | Up ^


#5 Re: Multi-Highlighter Quirk / requests

Posted by: xaos | Date: 2013-08-28 17:10 | IP: IP Logged

..really? .. so the first rendition wasn't quite perfect, hence the attempted explanation .. how bout this ..

<a href="?where=<?php echo $there,'">',$there;?> </a>

blue -> html opening tag
red -> html identifier
yellow -> html value (purple in the first post)
pink -> opening and closing php tags

.. please re-read the description from the first post more carefully, and try the copy and paste suggestion from the third post with both of these code rendtions.

I suppose that also means that there are no other thots on the second part of the first post ¿

Edited 2 time(s). Last edit at 2013-08-28 17:51 by xaos.

Options: Reply | Quote | Up ^


#6 Re: Multi-Highlighter Quirk / requests

Posted by: hhoefling | Date: 2013-08-28 17:39 | IP: IP Logged

Your open the " in html and terminate it in PHP

Try
<a href="?where=<?php echo $there;?>"><?php echo $there;?> </a>
( no " in php )

or

<a href=<?php echo '"?where=',$there,'">',$there;?> </a>
( both " in php )

Than the Highlight is correct (i.m.O)

I allways use this Variant:

echo "<a href=\"?where=$there\">$there</a>";

--
by HH

Options: Reply | Quote | Up ^


#7 Re: Multi-Highlighter Quirk / requests

Posted by: xaos | Date: 2013-08-28 17:49 | IP: IP Logged

I'm wondering if it's possible to account for that style of coding so that the highlighting continues correctly afterward ...

I've seen it done, albeit not in any of the freeware programs that I've tried .. and I realize this is a freeware program, so .. <shrug> was just wondering if it was possible, or even if anyone noticed it.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR