A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

18 linhas
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.