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

Added support to multiples versicles #32

Merged
merged 7 commits into from
Sep 19, 2024
Merged

Conversation

JoaoEmanuell
Copy link
Contributor

In this pull request, I am looking to add support for multiple verses separated into a single text.

Currently, the plugin only supports initial and final verses, such as: John 5:1-3. With this addition, the plugin now allows verses to be separated, such as: John 5:1-3, 8, 12-15, which improves usability and content generation.

However, after implementation, the only format accepted now is book chapter:verses, replacing the previous format that allowed book chapter, verses.

In addition, changes were made to the names of the books in Brazilian Portuguese, removing the accents to ensure easier book search.

The plugin was tested on Linux and Android platforms, both using Obsidian version 1.6.7.

Copy link
Owner

@jaanonim jaanonim left a comment

Choose a reason for hiding this comment

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

Thanks you for contributing, When I was making this project I didn't expected that so many people will find it useful and will want to contribute logic code.

  1. It is not acceptable for me to drop support for book chapter, verses notation (I'm form Poland and here it's the most popular notation eg. 2 Kor 1, 1-2.10 = 2 Co 1:1-2, 10). Here is refrence for you.

  2. It breaks support for whole chapter linking like John 5.

  3. The plugin supports both normal dash - and en-dash , but this change breaks support for en-dash - it get processed but invalid link is generated.

To sum up I would love to merge that future, but there need to be some changes to make it compatible with every use case.

src/EditorSuggester.ts Outdated Show resolved Hide resolved
src/EditorSuggester.ts Outdated Show resolved Hide resolved
src/Verse.ts Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@JoaoEmanuell
Copy link
Contributor Author

Hello, thanks for the suggestions, I managed to add support for texts with dots, commas, and en-dash.

I tested them in Brazilian Portuguese, English, and Polish and they all work normally.

Now the plugin supports texts with the structure: John 5: 1-2,6 | John 5.1-2,6 and John 5,1-2,6—9, the links are generated correctly and are not broken during generation.

However, I was unable to add support for the entire chapter (John 5) even in the original plugin I cannot insert the chapter this way, it only recognizes them when I insert the verses.

@jaanonim jaanonim self-requested a review September 18, 2024 15:40
@jaanonim jaanonim merged commit 1780eca into jaanonim:master Sep 19, 2024
1 check passed
@jaanonim
Copy link
Owner

Ok, I have made some changes myself and merege it. Ther will be new version in a moment. If you will find any bugs feel free to open issue.

@jaanonim jaanonim added the enhancement New feature or request label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants