Skip to content

Styles not working #2

@erikcw

Description

@erikcw

I'm trying to use styles with the markdown templatetag. I've setup settings.MARKDOWN_DEUX_STYLES to match the 3 styles in the README -- but regardless of which I call (trusted or recipe), the "default" style always gets used.

In [14]: from markdown_deux.conf import settings

In [15]: settings.MARKDOWN_DEUX_STYLES
Out[15]: {'default': {'extras': {'code-friendly': None}, 'safe_mode': 'escape'}}

In [16]: settings.settings.MARKDOWN_DEUX_STYLES                                                                                                                         
Out[16]: 
{'default': {'extras': {'code-friendly': None}, 'safe_mode': 'escape'},
 'recipe': {'extras': {'code-friendly': None,
   'cuddled-lists': None,
   'demote-headers': 3,
   'footnotes': None,
   'header-ids': None,
   'html-classes': {'pre': 'prettyprint'},
   'link-patterns': None,
   'pyshell': None},
  'link_patterns': [(re.compile(r'recipe\s+#?(\d+)\b', re.IGNORECASE),
    'http://code.activestate.com/recipes/\\1/')],
  'safe_mode': 'escape'},
 'trusted': {'extras': {'code-friendly': None}, 'safe_mode': False}}

# notice how it returns "default" even though "trusted" is being requested
In [18]: markdown_deux.get_style('trusted')
Out[18]: {'extras': {'code-friendly': None}, 'safe_mode': 'escape'}

It looks like the get_style function is only looking at the default settings, and not the updated settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions