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

Improvement: #414 Add functional bracket auto-completion #428

Merged
merged 3 commits into from
Jul 27, 2018

Conversation

enyaxu
Copy link
Contributor

@enyaxu enyaxu commented Jul 19, 2018

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
New tests added? not needed
Fixed tickets #414
License MIT

Description

Add functional bracket auto-completion for good experience.
kapture 2018-07-19 at 14 50 06

Please Review.

@Jocs Jocs self-requested a review July 19, 2018 06:57
@Jocs
Copy link
Member

Jocs commented Jul 19, 2018

Great thanks for this PR, I'll review it latter.

@Jocs
Copy link
Member

Jocs commented Jul 23, 2018

@enyaxu I have one question:

if you enter *, it will be auto-complete to *<cursor>*, now if you enter another *, I think the result will be **<cursor>**. the same as _.

What's your opinions?

I am very sorry that I reply to you now because I am busy recently.

@enyaxu
Copy link
Contributor Author

enyaxu commented Jul 23, 2018

@jdoc sorry,I reply from my phone, I will comment later

@Jocs
Copy link
Member

Jocs commented Jul 23, 2018

@enyaxu I can not see some characters in your above comment.

@enyaxu
Copy link
Contributor Author

enyaxu commented Jul 24, 2018

@Jocs In Markdown world, use *<cursor>* or _<cursor>_ for emphasis format, and **<cursor>** or __<cursor>__ for strong format.
without * auto-completion, you write like this for emphasis format:

* --> *<cursor>* --> *some foo<cursor>*, now you need move <cursor> by mouse or keyboard -> to *some foo*<cursor>, with auto-completion you can just enter * for this. This also for strong format.

@Jocs
Copy link
Member

Jocs commented Jul 24, 2018

@enyaxu There is a little bug.

when I input *w<cursor>*, and press backspace to delete w. and it does not work.

@enyaxu
Copy link
Contributor Author

enyaxu commented Jul 25, 2018

@Jocs Ok, let me fix this.

@enyaxu
Copy link
Contributor Author

enyaxu commented Jul 25, 2018

@Jocs Fix it, please review.

@Jocs
Copy link
Member

Jocs commented Jul 26, 2018

I'll review it this evening. thanks.

@Jocs
Copy link
Member

Jocs commented Jul 26, 2018

@enyaxu

I found a problem, when I type *<cursor>*, then press the space, an bullet order list appears, but I can't type Chinese in the bullet order list. I don't know if this problem is caused by this PR, but before master is normal. I am also troubleshooting the cause.

text = text.substring(0, offset) + text.substring(offset + 1)
this.cursor = lastCursor = { start, end }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need add this line code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because last implement used particalRender function, now yes It not needed.

text = text.substring(0, offset) + text.substring(offset + 1)
}
}
block.text = text
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the next 4 lines code need to put out of the if block. you can refer to the old codes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see it.

@Jocs
Copy link
Member

Jocs commented Jul 26, 2018

@enyaxu I find the reason that caused the Chinese problem, and you can see the comments.

@enyaxu
Copy link
Contributor Author

enyaxu commented Jul 26, 2018

@Jocs
Fixed Chinese type problem. Please review.

@Jocs
Copy link
Member

Jocs commented Jul 27, 2018

@enyaxu thank you again for this PR 👍

@Jocs Jocs merged commit 486eb93 into marktext:master Jul 27, 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.

2 participants