# Path: statik/errors.py
# class StatikErrorContext(object):
#     """Useful for representing context when exceptions are thrown (e.g. the name of
#     the current file being processed, line number, etc.)"""
#     
#     def __init__(self, filename=None, line_no=None):
#         self.filename = filename
#         self.line_no = line_no
# 
#     def render(self):
#         return ("in file \"%s\"%s" % (
#             self.filename,
#             (", line %d" % self.line_no) if self.line_no is not None else ""
#         )) if self.filename else None
#     
#     def update(self, filename=None, line_no=None):
#         self.filename = filename
#         self.line_no = line_no
#         
#         # line number is irrelevant now if no filename
#         if filename is None:
#             self.filename, self.line_no = None, None
#     
#     def clear(self):
#         self.filename, self.line_no = None, None
# 
# class ProjectConfigurationError(StatikError):
#     """For generic project configuration-related errors."""
#     error_kind = "Project configuration error"
#     exit_code = 2


from copy import copy
from statik.errors import StatikErrorContext, ProjectConfigurationError

        # Required list of Markdown extensions
        self.extensions = copy(MarkdownConfig.DEFAULT_MARKDOWN_EXTENSIONS)

        # Configuration for the markdown extensions
        self.extension_config = {}
        extension_list = markdown_params.get('extensions', [])

        # if it's a dictionary, first convert it to our list notation
        if isinstance(extension_list, dict):
            extension_list = []
            for ext_package, config in markdown_params['extensions'].items():
                extension_list.append({ext_package: config})

        # Try to load extensions as requested by config
        for extension in extension_list:
            if isinstance(extension, dict):
                ext_package, config = next(iter(extension.keys())), next(iter(extension.values()))
            else:
                ext_package, config = extension, None

            if ext_package not in self.extensions:
                self.extensions.append(ext_package)

            if config is not None: 
                if ext_package in self.extension_config:
                    self.extension_config[ext_package].update(config)
                else:
                    self.extension_config[ext_package] = config


# Path: statik/errors.py
# class StatikErrorContext(object):
#     """Useful for representing context when exceptions are thrown (e.g. the name of
#     the current file being processed, line number, etc.)"""
#     
#     def __init__(self, filename=None, line_no=None):
#         self.filename = filename
#         self.line_no = line_no
# 
#     def render(self):
#         return ("in file \"%s\"%s" % (
#             self.filename,
#             (", line %d" % self.line_no) if self.line_no is not None else ""
#         )) if self.filename else None
#     
#     def update(self, filename=None, line_no=None):
#         self.filename = filename
#         self.line_no = line_no
#         
#         # line number is irrelevant now if no filename
#         if filename is None:
#             self.filename, self.line_no = None, None
#     
#     def clear(self):
#         self.filename, self.line_no = None, None
# 
# class ProjectConfigurationError(StatikError):
#     """For generic project configuration-related errors."""
#     error_kind = "Project configuration error"
#     exit_code = 2


# Path: statik/markdown_config.py
from copy import copy
from statik.errors import StatikErrorContext, ProjectConfigurationError


        # Required list of Markdown extensions
        self.extensions = copy(MarkdownConfig.DEFAULT_MARKDOWN_EXTENSIONS)

        # Configuration for the markdown extensions
        self.extension_config = {}
        extension_list = markdown_params.get('extensions', [])

        # if it's a dictionary, first convert it to our list notation
        if isinstance(extension_list, dict):
            extension_list = []
            for ext_package, config in markdown_params['extensions'].items():
                extension_list.append({ext_package: config})

        # Try to load extensions as requested by config
        for extension in extension_list:
            if isinstance(extension, dict):
                ext_package, config = next(iter(extension.keys())), next(iter(extension.values()))
            else:
                ext_package, config = extension, None

            if ext_package not in self.extensions:
                self.extensions.append(ext_package)

            if config is not None: 
                if ext_package in self.extension_config:
                    self.extension_config[ext_package].update(config)
                else:
                    self.extension_config[ext_package] = config


    def __repr__(self):