Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion strictdoc/backend/sdoc/models/document_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from typing import TYPE_CHECKING, List, Optional, Tuple

from strictdoc.backend.sdoc.constants import SDocMarkup
from strictdoc.helpers.auto_described import auto_described

if TYPE_CHECKING:
Expand Down Expand Up @@ -128,7 +129,7 @@ def __init__(

def get_markup(self) -> str:
if self.markup is None:
return "RST"
return SDocMarkup.RST
return self.markup

def get_requirement_style_mode(self) -> str:
Expand Down
3 changes: 2 additions & 1 deletion strictdoc/export/html/renderers/markup_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from markupsafe import Markup

from strictdoc.backend.sdoc.constants import SDocMarkup
from strictdoc.backend.sdoc.models.anchor import Anchor
from strictdoc.backend.sdoc.models.document import SDocDocument
from strictdoc.backend.sdoc.models.inline_link import InlineLink
Expand Down Expand Up @@ -38,7 +39,7 @@ def create(
HTMLFragmentWriter,
TextToHtmlWriter,
]
if not markup or markup == "RST":
if not markup or markup == SDocMarkup.RST:
html_fragment_writer = RstToHtmlFragmentWriter(
project_config=config,
context_document=context_document,
Expand Down
2 changes: 1 addition & 1 deletion strictdoc/export/html2pdf/html2pdf_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def export_tree(
static_path=project_config.dir_for_sdoc_assets,
)
markup_renderer = MarkupRenderer.create(
"RST",
document_.config.get_markup(),
traceability_index,
link_renderer,
html_templates,
Expand Down
2 changes: 1 addition & 1 deletion strictdoc/server/routers/main_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,7 @@ def get_export_html2pdf(document_mid: str) -> Response: # noqa: ARG001
root_path=root_path, static_path=project_config.dir_for_sdoc_assets
)
markup_renderer = MarkupRenderer.create(
"RST",
document.config.get_markup(),
export_action.traceability_index,
link_renderer,
html_templates,
Expand Down
Loading