![]() |
|
Keywords and invalid 0 lines - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: General (https://forums.ldraw.org/forum-12.html) +--- Forum: Parts Tracker Discussion (https://forums.ldraw.org/forum-36.html) +--- Thread: Keywords and invalid 0 lines (/thread-29152.html) |
Keywords and invalid 0 lines - Orion Pobursky - 2025-11-02 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? RE: Keywords and invalid 0 lines - Franklin W. Cain - 2025-11-03 (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 RE: Keywords and invalid 0 lines - Orion Pobursky - 2025-11-03 Search is not case sensitive. This is more for consistency than anything else. RE: Keywords and invalid 0 lines - Peter Blomberg - 2025-11-03 (2025-11-02, 23:47)Orion Pobursky Wrote: I'm considering implementing the following automatic upon submit edits: 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) RE: Keywords and invalid 0 lines - Rene Rechthaler - 2025-11-03 (2025-11-02, 23:47)Orion Pobursky Wrote: I'm considering implementing the following automatic upon submit edits: 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) RE: Keywords and invalid 0 lines - Orion Pobursky - 2025-11-03 Rene Rechthaler Wrote: if a line gets edited empty, will two consecutive empty lines also get shortened to one empty line? 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. RE: Keywords and invalid 0 lines - Orion Pobursky - 2025-11-03 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). |