Posting all text in capitals

Posting all text in capitals

stuart
Enthusiast Enthusiast
422 Views
1 Reply
Message 1 of 2

Posting all text in capitals

stuart
Enthusiast
Enthusiast

Hi  Odd request but is there a simple way to change all text to capitalized on the HAAS Post Processor? 

 

I cannot see any radio buttons so I am assuming its a post mod?  Is it possible to add to the options on the post? (where you can switch on Line numbers etc).  There are a few things we would like to add.  

 

Cheers

 

 

0 Likes
423 Views
1 Reply
Reply (1)
Message 2 of 2

djowen40
Advocate
Advocate

Normally all code text is capital already so i assume you are looking to format comments as capitals. 

 

In which case find the formatComment function and add the line shown below.

(Do not modify the installed post, make a copy and store it else where before editing it.)

 

function formatComment(text) {
  text = String(text).toUpperCase();  // Add this line
  return "(" + String(text).replace(/[()]/g, "") + ")" ;
}

 if you want to make it switchable as a posting option via the dialogue then you will need to do a bit more work to add a property definition and a if statement to control it.