Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patches for incorrect headings parsing and fence code blocks not recognizing language class #33

Merged
merged 5 commits into from
May 28, 2018

Conversation

Jonarod
Copy link
Contributor

@Jonarod Jonarod commented Oct 1, 2017

Headings

Token[14] is limited to 3 ###, while headings can range from 1 # to 6 ######.
This limit leads to incorrect heading tags after 4 ####.
This change corrects current bug : token[14] should accept between 1 to 6 ######.

Fence code blocks

When language-code is given to fence code block, we should allow zero or more spaces between fences and the language input, like this :

``` [spaces] javascript
```

Strings surrounded by `~~` will be printed using `<s></s>` tags like referenced in [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s)
Token[14] is limited to 3 `###`, while headings can range from 1 `#` to 6 `######`.
This limit leads to incorrect heading tags after 4 `####`.
This change corrects current bug : token[14] should accept between 1 to 6 `######`.
When `language-code` is given to fenced code block, we should allow zero or more spaces between fences and `language`. Like this:
```
```js
```
or
```   js
```
```
@developit
Copy link
Owner

@Jonarod is strikethrough part of the markdown spec, or a GFM thing?

@Jonarod
Copy link
Contributor Author

Jonarod commented Dec 8, 2017

Yeah it's not commonmark: it's more of a GFM flavoured thing. but for the cost... I thought it'd be useful :)

@developit
Copy link
Owner

developit commented Dec 25, 2017

Looks like 12 bytes. I might take a stab at golfing it down a bit, but I agree this is a useful addition (and backwards-compatible).

@keul
Copy link

keul commented Mar 5, 2018

There's something unstable in that PR that prevent a merge?
I really like to have a release that fix the H1/H6 issue.

@developit
Copy link
Owner

I think switching to Microbundle made room for this!

@developit developit merged commit b450324 into developit:master May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants