That is how this converter was developed: https://github.com/JoyHak/MarkdownToBBCode#markdown
It was successfully tested on the latest complex changelog.
Here's the list of key features:
- Full support for GitHub syntax (basic and advanced).
- Recursive syntax conversion (lists containing lists, basic syntax containing basic syntax, etc.).
- Support for any type of list (ordered, unordered, with any prefix and nesting level).
- Attaching/detaching markdown list items from BBcode lists (ability to add or detach quotes and other items from the converted list).
- Support for multi-level quotes with the ability to include lists, mentions, and other syntax.
- Support for html tags and spoilers.
- Delete comments, mark text that does not need to be converted.
- Select a repository for converting Github issues, links, and commits.
- Restore text to its pre-conversion state for editing.
- Convert, copy, and clear with a single click.
- Convert file and save result to the new / existing file.
- Command line interface (CLI) for converting different files and combining their contents into a single file.
See detailed examples here.
The command line interface allows you to convert files and any text directly from the terminal. The result can be saved to a file or printed to the terminal and passed to any command using the
| pipe operator.Usage:
md2bb (<file_name> | <text> | @listfile) [<parameters> <switches>]Parameters
-save, -write The name / path of the file where to write the result. The result will be appended at the end of the file if it already exists. -repo, -repository, -domain Url to the repository for resolving relative links and references. -sep, -separator, -delimiter Separator for text parameters concatenation. Switches
-h, -help Displays help message. -overwrite Overwrite the file where to write the result. Parameters order doesn't matter:
Code: Select all
md2bb -save 'forum.md' 'readme.md'
md2bb 'readme.md' -save 'forum.md'
/ - --.Parameter without prefix will be treated as file name / text / listfile to convert:
Code: Select all
md2bb 'readme.md' 'add text' '@listfile.md'
Reads and converts contents of 'readme.md', then converts 'add text', then reads and converts contents of 'listfile.md' line by line.
XYplorer Beta Club