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

feat: new textobj mdEmphasis #64

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

stevenxxiu
Copy link
Contributor

@stevenxxiu stevenxxiu commented Jan 2, 2024

Checklist

  • Used only camelCase variable names.
  • If functionality is added or modified, also made respective changes to the readme.
  • Used conventional commits keywords.

Test cases:

abc *te\*st* def
abc **te\*st** def
abc ***te\*st*** def
abc _te\_st_ def
abc __te\_st__ def
abc ___te\_st___ def
abc __*te\_st*__ def
abc __*te\*st*__ def
abc _**te\_st**_ def
abc _**te\*st**_ def
abc **_te\*st_** def
abc **_te\_st_** def
abc *__te\_st__* def
abc *__te\*st__* def

abc *t* def
abc **t** def
abc ***t*** def
abc _t_ def
abc __t__ def
abc ___t___ def
abc __*t*__ def
abc _**t**_ def
abc **_t_** def
abc *__t__* def

*t* def
**t** def
***t*** def
_t_ def
__t__ def
___t___ def
__*t*__ def
_**t**_ def
**_t_** def
*__t__* def

abc ~~te\~st~~ def
abc ==te\=st== def

abc ~~t~~ def
abc ==t== def

~~t~~ def
==t== def

Thanks for this plugin. And a happy new year!

Copy link
Owner

@chrisgrieser chrisgrieser left a comment

Choose a reason for hiding this comment

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

Good idea. Also good to consider bold+italics, escaping, different markup styles etc from the start.

README.md Outdated Show resolved Hide resolved
lua/various-textobjs/charwise-textobjs.lua Outdated Show resolved Hide resolved
lua/various-textobjs/charwise-textobjs.lua Outdated Show resolved Hide resolved
lua/various-textobjs/default-keymaps.lua Outdated Show resolved Hide resolved
lua/various-textobjs/charwise-textobjs.lua Outdated Show resolved Hide resolved
@chrisgrieser
Copy link
Owner

One thing that occurred to me just now is that the emphasis object could maybe also include ==highlights== and ~~strikethrough~~? (though the latter is strictly speaking not really "emphasis")

@stevenxxiu stevenxxiu force-pushed the feat/md-emphasis branch 6 times, most recently from 9d71fea to c2bb5fa Compare January 2, 2024 16:10
@stevenxxiu
Copy link
Contributor Author

Strikethrough and highlights added! I didn't even know Markdown had highlights.

@chrisgrieser
Copy link
Owner

readme needs to be adjusted for the changes, otherwise it looks good to me

@stevenxxiu
Copy link
Contributor Author

Readme updated.

@chrisgrieser
Copy link
Owner

I think you accidentally ran a formatter on the table? cause the whole table is now included in the diff. Could you undo that formatting to keep the diff history clean?
Pasted image 2024-01-02 at 17 43 39@2x

@stevenxxiu
Copy link
Contributor Author

Ah I just updated the table to align the columns. There's quite a few things that count as emphasis and there wasn't enough space.

@chrisgrieser
Copy link
Owner

oh, I see. Yeah then it's fine. Thanks for the PR!

@chrisgrieser chrisgrieser merged commit 3bd66fa into chrisgrieser:main Jan 2, 2024
1 check passed
@stevenxxiu stevenxxiu deleted the feat/md-emphasis branch January 3, 2024 07:21
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