Skip to content

Default pybb behavior translates all double-hyphens to n-dash #5

Description

@ChrisFreeman

All double-hyphens ("--") become n-dashes when posting to the forum. There isn't a way to escape a double-hyphen to prevent this. It is a "feature" of the core bbcode code. Double-hyphens are often used in python command line arguments.

A work-around is possible by modifying pdxcg/pybb/defaults.py, line 62 to add the argument:

replace_cosmetic = False

The new line is:

bbcode_parser.add_simple_formatter('code', '<pre><code>%(value)s</code></pre>', replace_cosmetic = False, render_embedded=False, transform_newlines=False, swallow_trailing_newline=True)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions