A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

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