mottox2 / remark-code-titles

16 stars 2 forks source link

Support for code titles with spaces or : #2

Closed marcofranssen closed 3 years ago

marcofranssen commented 3 years ago

When using a code title that contains spaces (`) or:the code title is cut of at the space or the:`.

e.g.

```cmd:C:\Users\Marco\.profile
```

Result: C. Expected: C:\Users\Marco\.profile

```cmd:Command prompt
```

Result: Command. Expected: Command prompt

I have also tried putting the title in quotes and single quotes.

I think for these cases we should ensure that if the title is quoted (single or double) this should be considered part of the whole title.

```cmd:'Command prompt'
```

or

```cmd:"C:\Users\Marco\.profile"
```

Expected: Command prompt and C:\Users\Marco\.profile.

cseas commented 3 years ago

@mottox2 Not sure why the spaces (`) issue is happening but I believe #3 should fix the issue with colons (:`) in the title.

mottox2 commented 3 years ago

Thanks. I published this patch as v0.1.2.