A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

18 lignes
798 B

  1. Caveats
  2. =======
  3. An inherent limitation in wikicode prevents us from generating complete parse
  4. trees in certain cases. For example, the string ``{{echo|''Hello}}, world!''``
  5. produces the valid output ``<i>Hello, world!</i>`` in MediaWiki, assuming
  6. ``{{echo}}`` is a template that returns its first parameter. But since
  7. representing this in mwparserfromhell's node tree would be impossible, we
  8. compromise by treating the first node (i.e., the template) as plain text,
  9. parsing only the italics.
  10. The current workaround for cases where you are not interested in text
  11. formatting is to pass *skip_style_tags=True* to :func:`mwparserfromhell.parse`.
  12. This treats ``''`` and ``'''`` like plain text.
  13. A future version of mwparserfromhell will include multiple parsing modes to get
  14. around this restriction.