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

Fix backtick_code_block for ignore tab character. #1229

Merged
merged 1 commit into from
Apr 26, 2015

Conversation

naokiy
Copy link
Contributor

@naokiy naokiy commented Apr 25, 2015

``` (tab)
Hello world!
```

The expressions like this causes a bug.

In this case, args in backtickCodeBlock() is not blank (it contains a tab character).
Then the args will not match both of rAllOptions and rLangCaption.
So match will be null. and we can't get match[1] in this case.

To fix it, I check whether match is null or not.

This pull request may solve #1228.

<raw>``` (tab)
Hello world!
</new>

The expressions like this causes a bug.

In this case, `args` in backtickCodeBlock() is not blank (but a tab character).
Then the `args` will not match both of rAllOptions and rLangCaption.
So `match` will be `null`. and we can't get `match[1]` in this case.

To fix it, I check whether `match` is null or not.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 95.45% when pulling 63e66c3 on naokiy:fix_backtick_codeblock_regex into eaa0ed5 on hexojs:master.

tommy351 added a commit that referenced this pull request Apr 26, 2015
Fix backtick_code_block for ignore tab character.
@tommy351 tommy351 merged commit 1a16481 into hexojs:master Apr 26, 2015
@naokiy naokiy deleted the fix_backtick_codeblock_regex branch April 26, 2015 10:10
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.

None yet

3 participants