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

Feature/add in-text work citations #50

Merged
merged 5 commits into from
Aug 5, 2024

Conversation

johannesdewit
Copy link
Collaborator

Adds separate processing for links to works within descriptions which are not citations but mere mentions of the works. This is preferable to the old situation as not al links to works occur within a citation-context (see the example in the screenshots).

Features

  • One can mention a work in the following forms @work_key or @{work_key}, which copies pandoc's syntax for mentions.
  • A mention will create a link, and include the work title in as link text.
  • Old citations of the form [[@work_key]] are processed as before.

Changes in the code

  • I added an inline processor in md.py for the work mention links, refactoring a bit of the work citation code as well.
  • Updated the descriptions to match the new syntax.

Example

Former:
Screenshot 2024-07-31 at 19 23 37

With changes:
Screenshot 2024-07-31 at 19 23 13

@johannesdewit johannesdewit added the enhancement New feature or request label Jul 31, 2024
@johannesdewit johannesdewit requested a review from andredelft July 31, 2024 17:40
Copy link
Owner

@andredelft andredelft left a comment

Choose a reason for hiding this comment

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

Paar kleine opmerkingen, maar ziet er mooi uit!

heidegger_index/md.py Outdated Show resolved Hide resolved
heidegger_index/md.py Show resolved Hide resolved
heidegger_index/md.py Outdated Show resolved Hide resolved
@johannesdewit johannesdewit changed the title Feature/add non-citation work links Feature/add in-text work citations Aug 5, 2024
@johannesdewit johannesdewit merged commit cd88aad into main Aug 5, 2024
1 check passed
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