A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

18 рядки
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.