Skip to content

Commit

Permalink
django compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Mar 16, 2024
1 parent 993c0ad commit b3777f1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
23 changes: 23 additions & 0 deletions mathics/doc/common_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,46 @@


from mathics.doc.doc_entries import (
ALLOWED_TAGS,
ALLOWED_TAGS_RE,
CONSOLE_RE,
DL_ITEM_RE,
DL_RE,
HYPERTEXT_RE,
IMG_PNG_RE,
IMG_RE,
LATEX_RE,
LIST_ITEM_RE,
LIST_RE,
MATHICS_RE,
PYTHON_RE,
QUOTATIONS_RE,
REF_RE,
SPECIAL_COMMANDS,
DocTest,
DocTests,
DocText,
DocumentationEntry,
Tests,
get_results_by_test,
parse_docstring_to_DocumentationEntry_items,
post_sub,
pre_sub,
)

gather_tests = parse_docstring_to_DocumentationEntry_items
XMLDOC = DocumentationEntry

from mathics.doc.structure import (
MATHICS3_MODULES_TITLE,
SUBSECTION_END_RE,
SUBSECTION_RE,
DocChapter,
DocGuideSection,
DocPart,
DocSection,
DocSubsection,
Documentation,
MathicsMainDocumentation,
sorted_chapters,
)
1 change: 0 additions & 1 deletion mathics/doc/doc_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"Wolfram": (r"<em>Wolfram</em>", r"\emph{Wolfram}"),
"skip": (r"<br /><br />", r"\bigskip"),
}
SUBSECTION_END_RE = re.compile("</subsection>")


TESTCASE_RE = re.compile(
Expand Down
2 changes: 1 addition & 1 deletion mathics/doc/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
CHAPTER_RE = re.compile('(?s)<chapter title="(.*?)">(.*?)</chapter>')
SECTION_RE = re.compile('(?s)(.*?)<section title="(.*?)">(.*?)</section>')
SUBSECTION_RE = re.compile('(?s)<subsection title="(.*?)">')

SUBSECTION_END_RE = re.compile("</subsection>")

# Debug flags.

Expand Down

0 comments on commit b3777f1

Please sign in to comment.