A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

definitions.h 1.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. Copyright (C) 2012-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  3. Permission is hereby granted, free of charge, to any person obtaining a copy of
  4. this software and associated documentation files (the "Software"), to deal in
  5. the Software without restriction, including without limitation the rights to
  6. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  7. of the Software, and to permit persons to whom the Software is furnished to do
  8. so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in all
  10. copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. SOFTWARE.
  18. */
  19. #pragma once
  20. #include "common.h"
  21. /* This file should be kept up to date with mwparserfromhell/definitions.py. */
  22. /* Functions */
  23. int is_parsable(PyObject*);
  24. int is_single(PyObject*);
  25. int is_single_only(PyObject*);
  26. int is_scheme(PyObject*, int);
  27. /* Macros */
  28. #define GET_HTML_TAG(markup) \
  29. (markup == ':' ? "dd" : markup == ';' ? "dt" : "li")