Skip to content

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

@ChrisFreeman

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)

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