User:PerfektesChaos/js/WikiSyntaxTextMod/flow

WikiSyntaxTextMod → Work flow

Mode of Operation

Survey on the general approach.

Procedure

Basically the script executes the major steps in the following sequence:

  1. single characters – will be standardized
  2. tag soup – stir well
  3. templates – analyze, adapt
  4. links – analyze, adapt
  5. protected regions – define, if necessary
  6. readability of syntax – to be improved
  7. localization – if not done already by previous steps
  8. syntax correction clears errors which can be fixed automatically or notifies on syntax errors, which are reconstructable unambiguously.
  9. Some minor issues will be solved, which might be visible to the reader of the article.

Now the actual standardization of wikisyntax is finished. This basic cleanup is performed automatically and with every execution.

Continuation

Next, some few typographic adjustments meaningful for all latin texts are imposed.

Later the user defined replacements for plain text are performed, if any. If user defined replacements are heading for link targets oder template transclusions, they have been executed already integrated into the respective step.

Efficient implementation

It is avoided to scan the entire text many times again and again by complex regular expressions matching every single syntax problem.

In fact, the searchable strings will be scanned exactly one time for occurring of a few terms and all issues related to this pattern. With each match the local environment of the spot is investigated and all related questions will be resolved.

  • First, the code value of any occurring character is inspected and might be transformed or prebooked for later syntax representation.
  • Then the text will be searched one time for the following strings:
    • "<" – If it yields to be a Tag the appropriate action is taken:
      • A comment "<!--" will be subject to a user defined comment modification.
      • All comments will be protected against any later search attempt.
      • The inner syntax of the tag is formatted, corrected if required.
      • Related opening and closing tags will be identified, checked for correct nesting, some elements processed from opening until closing tag.
    • "{{" – template transclusions are analyzed regarding their extension.
    • "[" – Possible links in brackets are detected (wikilink and URL), might be fixed, formatted, changed on user request, and protected against text changes if necessary.
    • "://" – URL without brackets are treated as mentioned before.

[ German page ]

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.