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

Markdown rendering should keep {} #10928

Closed
koppor opened this issue Feb 26, 2024 · 6 comments · Fixed by #11196
Closed

Markdown rendering should keep {} #10928

koppor opened this issue Feb 26, 2024 · 6 comments · Fixed by #11196
Assignees
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@koppor
Copy link
Member

koppor commented Feb 26, 2024

JabRef has internally a field marker that marks a field as Markdown. org.jabref.model.entry.field.FieldProperty#MARKDOWN

When that field is rendered in the preview, {} should be kept.

Example content of a Comment:

# test

{ test }

```javascript
function hero() {
}
```

307950652-09a3c1b5-dcb5-4553-bce6-766ca5775b84

307951490-65d6369a-f775-4183-89d0-371cf46cc9c1


This issue is more about code reading and understanding JabRef's archictecture. The "real" fix should be a few lines of code: Checking for the field property MARKDOWN and passing the field value with plain latex (and not latex free).

@koppor koppor added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Feb 26, 2024
@github-project-automation github-project-automation bot moved this to Free to take in Good First Issues Feb 26, 2024
@LoayGhreeb
Copy link
Collaborator

I would like to work on this issue

@LoayGhreeb
Copy link
Collaborator

Hi @koppor, I did my best for solving this issue, but I don't know how to solve it. I noticed that comment or abstract use both Markdown and HTMLChars formatters. However, the HTMLChars formatter always deletes any curly brackets in the string. I'm not sure if this is related to the issue or not.
Could you provide a hint or guide on how to proceed?

@koppor
Copy link
Member Author

koppor commented Feb 28, 2024

Related PR: #10942?

Currently, I think, following lines in the HTMLChars should be removed

            } else if (!incommand && ((c == '{') || (c == '}'))) {
                // Swallow the brace.

Adapt tests.

In .layout files, search for HTMLChars and check where to add RemoveBrackets before.

Thinking more, the LaTeX command handling in HTMLChars should be removed. In the .layout files, LaTeXToUnicode should be used. - I think, HTMLChars will be much smaller then. HTML5 default encoding is unicode, thus LaTeXToUnicode is the right formatter.

@ThiloteE ThiloteE moved this from Free to take to Reserved in Good First Issues Mar 12, 2024
@koppor
Copy link
Member Author

koppor commented Apr 8, 2024

@LoayGhreeb Any progress here? 😅

@LoayGhreeb LoayGhreeb removed their assignment Apr 9, 2024
@LoayGhreeb
Copy link
Collaborator

I've unassigned myself and am currently working on another issue. I'll come back to this one soon if nobody else takes it.

@ThiloteE ThiloteE moved this from Reserved to Free to take in Good First Issues Apr 9, 2024
@jeanprbt
Copy link
Contributor

You can assign me on this one if you wish !

@koppor koppor moved this from Free to take to Reserved in Candidates for University Projects Apr 11, 2024
@koppor koppor moved this from Free to take to Reserved in Good First Issues Apr 11, 2024
@github-project-automation github-project-automation bot moved this from Reserved to Done in Good First Issues Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants