Repository: Avaiga/taipy
File: taipy/gui/gui.py (Python)

Code before:
        application. If there is no such function, status page content shows only the status of the
        server.<br/>

        The signature of the *on_status* callback function must be:

        - *state*: the `State^` instance of the caller.

        It must return raw and valid HTML content as a string.
        """
        self.on_user_content: t.Optional[t.Callable] = None
        """The function that is called when a specific URL (generated by `get_user_content_url()^`) is requested.

        This callback function must return the raw HTML content of the page to be displayed on
        the browser.

        This attribute defaults to the `on_user_content()` global function defined in the Python
        application. If there is no such function, those specific URLs will not trigger
        anything.<br/>
        The signature of the *on_user_content* callback function must be:

        - *state*: the `State^` instance of the caller.
        - *path*: the path provided to the `get_user_content_url()^` to build the URL.
        - *arguments*: An optional dictionary as defined in the `get_user_content_url()^` call.

        The returned HTML content can therefore use both the variables stored in the *state*
        and the arguments provided in the call to `get_user_content_url()^`.
        """

        # sid from client_id
        self.__client_id_2_sid: t.Dict[str, t.Set[str]] = {}

        # Load default config
        self._flask_blueprint: t.List[Blueprint] = []
        self._config._load(default_config)

        # get taipy version
        try:
            gui_file = Path(__file__ or ".").resolve()
            with open(gui_file.parent / "version.json") as version_file:
                self.__version = json.load(version_file)
        except Exception as e:  # pragma: no cover
            _warn("Cannot retrieve version.json file", e)
            self.__version = {}

        # Load Markdown extension
        # NOTE: Make sure, if you change this extension list, that the User Manual gets updated.
        # There's a section that explicitly lists these extensions in
        #      docs/gui/pages.md#markdown-specifics
        self._markdown = md_lib.Markdown(
            extensions=[
                "fenced_code",

Review comment (suggestion):
```suggestion
        and the parameters provided in the call to `get_user_content_url()^`.
```

Code after:
        application. If there is no such function, status page content shows only the status of the
        server.<br/>

        The signature of the *on_status* callback function must be:

        - *state*: the `State^` instance of the caller.

        It must return raw and valid HTML content as a string.
        """
        self.on_user_content: t.Optional[t.Callable] = None
        """The function that is called when a specific URL (generated by `get_user_content_url()^`) is requested.

        This callback function must return the raw HTML content of the page to be displayed on
        the browser.

        This attribute defaults to the `on_user_content()` global function defined in the Python
        application. If there is no such function, those specific URLs will not trigger
        anything.<br/>
        The signature of the *on_user_content* callback function must be:

        - *state*: the `State^` instance of the caller.
        - *path*: the path provided to the `get_user_content_url()^` to build the URL.
        - *parameters*: An optional dictionary as defined in the `get_user_content_url()^` call.

        The returned HTML content can therefore use both the variables stored in the *state*
        and the parameters provided in the call to `get_user_content_url()^`.
        """

        # sid from client_id
        self.__client_id_2_sid: t.Dict[str, t.Set[str]] = {}

        # Load default config
        self._flask_blueprint: t.List[Blueprint] = []
        self._config._load(default_config)

        # get taipy version
        try:
            gui_file = Path(__file__ or ".").resolve()
            with open(gui_file.parent / "version.json") as version_file:
                self.__version = json.load(version_file)
        except Exception as e:  # pragma: no cover
            _warn("Cannot retrieve version.json file", e)
            self.__version = {}

        # Load Markdown extension
        # NOTE: Make sure, if you change this extension list, that the User Manual gets updated.
        # There's a section that explicitly lists these extensions in
        #      docs/gui/pages.md#markdown-specifics
        self._markdown = md_lib.Markdown(
            extensions=[
                "fenced_code",