Keywords and invalid 0 lines


Keywords and invalid 0 lines
#1
I'm considering implementing the following automatic upon submit edits:
- Remove all lines that consist of a single "0" and replace with a blank line
- Remove all lines that are "0 //" (i.e. a blank comment) and replace with a blank line
- If the last line is a single "0", remove completely
- Capitalize the first word for all keywords.

Thoughts?
Reply
RE: Keywords and invalid 0 lines
#2
(2025-11-02, 23:47)Orion Pobursky Wrote: - Capitalize the first word for all keywords.

If the search function is not case-sensitive, would this one really matter? 

(And if the search function actually =is= case-sensitive, and I've not known this until now, then I'd argue for Title Capitalization, instead of Sentence Capitalization.) 

Thanks! 
Franklin
Reply
RE: Keywords and invalid 0 lines
#3
Search is not case sensitive. This is more for consistency than anything else.
Reply
RE: Keywords and invalid 0 lines
#4
(2025-11-02, 23:47)Orion Pobursky Wrote: I'm considering implementing the following automatic upon submit edits:
- Remove all lines that consist of a single "0" and replace with a blank line
- Remove all lines that are "0 //" (i.e. a blank comment) and replace with a blank line
- If the last line is a single "0", remove completely

Sure, if you account for random whitespace after the "0" or the "0 //"

Can this be done also for all official files? (without having the go through the review process)
Reply
RE: Keywords and invalid 0 lines
#5
(2025-11-02, 23:47)Orion Pobursky Wrote: I'm considering implementing the following automatic upon submit edits:
- Remove all lines that consist of a single "0" and replace with a blank line
- Remove all lines that are "0 //" (i.e. a blank comment) and replace with a blank line
- If the last line is a single "0", remove completely
- Capitalize the first word for all keywords.

Thoughts?

if a line gets edited empty, will two consecutive empty lines also get shortened to one empty line?
(and empty last lines could be always deleted)
Reply
RE: Keywords and invalid 0 lines
#6
Rene Rechthaler Wrote: if a line gets edited empty, will two consecutive empty lines also get shortened to one empty line?
(and empty last lines could be always deleted)

Peter Blomberg Wrote: Sure, if you account for random whitespace after the "0" or the "0 //"

All submitted files get the following processing:
- Non-standard UTF-8 encoding gets fixed
- Extra white space on the front and back of the whole file is trimmed
- All line endings are changed to unix style (make it easier edit in code, they get changed back when downloaded)
- Extra white space on the front and back of each line is trimmed
- Multiple, consecutive newlines are squished into one new line. 
- Except for the first line (the description), all extra white space between non-whitespace characters is squished to one space

Peter Blomberg Wrote: Can this be done also for all official files? (without having the go through the review process)

A script has been written to do just this.
Reply
RE: Keywords and invalid 0 lines
#7
I reviewed the code. It seems I forgot that I have already implemented the stripping of blank comments (both "0" and "0 //") for new submits.

The script to fix existing parts has not yet been run (that will happen close to the next release).
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)