Skip to content

Commit 7cf0f71

Browse files
committed
words
1 parent b857d00 commit 7cf0f71

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
[![Publish to PyPI](https://github.com/RedGuides/md2bbcode/actions/workflows/publish.yml/badge.svg)](https://github.com/RedGuides/md2bbcode/actions/workflows/publish.yml)
22

3-
![md2bbcode logo](https://www.redguides.com/images/md2bbcode-logo.png)
3+
![md2bbcode logo, original image 'A Specious Origin' by Jerry LoFaro.](https://www.redguides.com/images/md2bbcode-logo.png)
44

55
# md2bbcode
6-
**A wrapper and plugin for [Mistune](https://github.com/lepture/mistune).** It converts GitHub-flavored Markdown to Xenforo-flavored BBCode. Custom BBCodes made for RedGuides are included in `bb_codes.xml`.
6+
**A wrapper and plugin for [Mistune](https://github.com/lepture/mistune).** It converts most GitHub-flavored Markdown to Xenforo-flavored BBCode.
77

8-
## Installation
8+
> [!TIP]
9+
> Custom BBCodes made for RedGuides are included in `bb_codes.xml`, import the ones you want in your Xenforo installation at `admin.php?bb-codes`. Some custom BBCodes include css, which you can split off to your extra.css template for more efficiency.
910
10-
You can install md2bbcode using pip:
11-
12-
```bash
13-
pip install md2bbcode
14-
```
11+
> [!NOTE]
12+
> This project is made with LLM assistance.
1513
1614
## Usage
1715

@@ -62,17 +60,12 @@ If you want to contribute to md2bbcode or set up a development environment, foll
6260
cd md2bbcode
6361
```
6462

65-
2. Install Hatch, which is used for building and managing the project:
66-
```bash
67-
pip install hatch
68-
```
69-
70-
3. Create a development environment and install dependencies:
63+
2. Create a development environment and install dependencies:
7164
```bash
7265
hatch env create
7366
```
7467

75-
4. Activate the development environment:
68+
3. Activate the development environment:
7669
```bash
7770
hatch shell
7871
```
@@ -87,9 +80,9 @@ The custom plugin for Mistune, which converts AST to bbcode.[^1]
8780

8881
### html2bbcode
8982

90-
Converts several HTML tags typically allowed in Markdown to BBCode.[^2]
83+
Converts most HTML tags typically allowed in Github Flavored Markdown to BBCode.[^2]
9184

92-
[^2]: Currently used for post-processing mistune output, but there's a better way. See inside the file for a suggestion.
85+
[^2]: Currently used for post-processing mistune output. Reference: https://github.github.com/gfm/#raw-html
9386

9487
```bash
9588
html2bbcode input_file.html
@@ -105,18 +98,25 @@ md2ast input.md output.json
10598

10699
## Features Test
107100

108-
Here are a few GitHub-flavored Markdown features so you can use this README.md for testing:
101+
Here are a few GitHub-flavored Markdown features so you can use this README.md for testing, including the table:
102+
103+
| Feature | Markdown | Rendered |
104+
| :------------ | :-------------: | ---------------:|
105+
| Bold | `**text**` | **bold** |
106+
| Italic | `*text*` | *italic* |
107+
| Strikethrough| `~~text~~` | ~~struck~~ |
108+
| Code | `` `code` `` | `inline` |
109+
| Link | `[text](url)` | [example](https://example.com) |
110+
| Superscript | `<sup>2</sup>` | E=mc<sup>2</sup> |
111+
| Subscript | `<sub>2</sub>` | H<sub>2</sub>O |
109112

110-
- **Strikethrough:** ~~This text is struck through.~~
111-
- **Superscript:** This text is normal and this is <sup>superscript</sup>.
112-
- **Table:**
113+
<details>
114+
<summary>HTML spoiler (details/summary)</summary>
113115

114-
| Syntax | Description |
115-
| ----------- | ----------- |
116-
| Header | Title |
117-
| Paragraph | Text |
116+
<b>html2bbcode</b> test. This is hidden content. Water is H<sub>2</sub>O.
118117

119-
## Todo
118+
<font color="red" size="3" face="Arial">Font tag inside details size 3 Arial red</font>
120119

121-
- refactor html2bbcode
122-
- update for new Xenforo 2.3 and 2.4 BBCode
120+
<span style="color: #27F573; font-size: 12px; font-family: Times New Roman; font-weight: bold; font-style: italic; text-decoration: underline line-through;">Inline style inside details green times new roman strikethrough italic bold underline</span>
121+
<blockquote data-author="John Doe">This is a quote by John Doe</blockquote>
122+
</details>

0 commit comments

Comments
 (0)