Skip to content

Commit

Permalink
Updated Comment Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Aug 20, 2021
1 parent d86621d commit cbd2cec
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Haas_Lathes_BIDC/Bechtel ST-20.cps
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ properties = {
title: "Show notes",
description: "Writes operation notes as comments in the outputted code.",
type: "boolean",
value: false,
value: true,
scope: "post"
},
useCycles: {
Expand Down Expand Up @@ -1090,7 +1090,15 @@ function formatComment(text) {
Output a comment.
*/
function writeComment(text) {
writeln(formatComment(text));
if (text.length > 80) {
var i = 0;
text = text.match(/.{1,80}/g);
while (text[i] != null) {
writeln(formatComment(text[i++]));
}
} else {
writeln(formatComment(text));
}
}

function getB(abc, section) {
Expand Down

0 comments on commit cbd2cec

Please sign in to comment.