redlines icon indicating copy to clipboard operation
redlines copied to clipboard

Output redline in BBCode style

Open houfu opened this issue 1 year ago • 2 comments

Currently, redlines output in markdown, including GHFM flavors. (See docs)

It would be good to output in BBCode format as a distinct style in output_markdown.

  • [ ] Add style to output_markdown
  • [ ] Add test
  • [ ] Add docs

houfu avatar Oct 03 '24 16:10 houfu

Hey, I'd like to work on this.

Just so I understand, is this the expectation:

from redlines import Redlines

test = Redlines(
    "The quick brown fox jumps over the lazy dog.",
    "The quick brown fox walks past the lazy dog.",
    markdown_style="bb-code"  # This option specifies the style as bb-code
)

test.output_markdown() # The quick brown fox [s]jumps over [/s][u]walks past [/u]the lazy dog.

tharun634 avatar Oct 03 '24 16:10 tharun634

Yup, though

  • it should be "bbcode"
  • It would be better if it was colored red for deletion and green for addition.

houfu avatar Oct 03 '24 16:10 houfu

Merged in 0.5

houfu avatar Nov 02 '24 00:11 houfu