Options for pasting procedure code
Pasting code from a MET/CAL procedure or a MET/TEAM data check sometimes does not preserve whitespace, line breaks, or other formatting, resulting in unreadable code in this forum. Here are two options I have found for sharing code:
This is the simplest method. You paste the code that you want to share into a separate website, then share a link to your paste here so readers can view it.
- Visit http://pastebin.com
- Copy and paste your code into the New Paste window.
- Select any Optional Paste Settings, if desired.
- Click Submit.
- Copy the URL for your paste in your browser's address bar, then paste it here in your post.
Disable rich-text method
This method is more complex, but also allows you to paste your code directly into a comment here so that the code is displayed inline. It requires you to reveal the HTML tags for your post, and make a simple edit of text between two HTML tags.
- Copy the code you want to share to your Windows clipboard.
- Start a new discussion or begin making a reply on this forum.
- Enter text as a placeholder that's easy to identify. I usually use something like "zzz".
- Select your "zzz" text, open the Styles drop-down menu from the formatting tools, then select the Computer Code style to apply it.
- Below this forum's text editor, click the link to Disable rich-text.
- Find your "zzz" text among the HTML and paste your code, replacing the "zzz" text.
- Click Preview to make sure it appears correctly.
Note: this method requires you to edit the HTML for your post, and some characters are reserved in HTML including the less than (<) or greater than (>) signs and ampersands (&). If your code contains any of these reserved characters, you must replace them with the valid HTML entity to prevent errors. Refer to this website for more information and a list of reserved characters with their HTML entities: http://www.w3schools.com/html/html_entities.asp.