CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, Fhalcon, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Fri Apr 26, 2019 2:14 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Code Format Rule: Avoid new line for standard Punctuation
PostPosted: Mon Jan 25, 2016 2:06 pm 
Offline

Joined: Mon Jan 25, 2016 1:12 pm
Posts: 2
Hi there^^, my first question...

Problem: When using code formatting [Tools > Code format > Format], typical in-sentence punctuations after </tags> are moved to a new line, creating an empty space.

---
Example: "... this is an <strong>example</strong>: ..."

After formatting the html looks like this (which is obviously the good reason for auto-format):
"... this is an <strong>
example
</strong>: ..."

And on the page it looks like: "... this is an example : ..."
So I have to manualy remove all the linebreaks to avoid the empty spaces (between 'example' and ':')

---
Can anyone think of a really clever exception-rule to avoid this - at least inside <p></p>?
Or maybe a nice [Replace] formulation that can be used on selected paragraphs to remove linebreaks?
If I use regular expressions (\n) for this, everything is messed up, because the breaks are gone, but the tab-stops persist... same result with additionally crippled code.

Thanks,
Chris


Last edited by Apira Prima on Mon Jan 25, 2016 2:53 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Code Format Rule: Avoid new line for standard Punctuatio
PostPosted: Mon Jan 25, 2016 3:04 pm 
Offline

Joined: Mon Jan 25, 2016 1:12 pm
Posts: 2
Sorry for the stupid question... found the obvious answer myself: Run [Replace] several times

0) Select a paragraph.
1) Remove linebreaks: Replace "\n" with nothing, keep the paragraph selected.
2) Delete tabstops: Replace "\t" with nothing.

I leave this post here for other newbies like me :-)

Chris


Attachments:
Remove linebreaks, then tabstops.jpg
Remove linebreaks, then tabstops.jpg [ 39.47 KiB | Viewed 13009 times ]
Top
 Profile  
 
 Post subject: Re: Code Format Rule: Avoid new line for standard Punctuatio
PostPosted: Mon Dec 25, 2017 3:31 pm 
Offline

Joined: Mon Aug 08, 2016 12:21 pm
Posts: 5
I also have this "problem".
It is very disappointing, that you have to go through your whole html texts to repair all missformated lines.
like " ... band name is <strong>Slayer</strong>."
So you have to find all this positions to remove the line break to avoid that extra space between "Slayer" and the "."
And if you or a colleague starts autoformat again, you have to to the whole work again!!!

May the CodeLobster Team could find and implement a suitable solution for that!.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2016 phpBB Group