Skip to content

Correct typo in scope name in boilerplate.theme #12

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tflexs
Copy link

@tflexs tflexs commented Mar 28, 2023

No description provided.

@tajmone
Copy link
Owner

tajmone commented Mar 28, 2023

Hi @tflexs, thanks for your contribution!
I see you propose changing Others to Other:

"Others": {

It's been quite a while since I created this theme, but as far as I can remember it was based on the keywords found in Skylighting themes — since not every theme contained all elements, I had to dig through different themes to extract theme, and I'm pretty sure I had double checked them all.

I think that at the time of pandoc 2, the element was Others, plural.
I've checked again, and found a theme example in the Skylighting repository that defines this element, in the language.xsd file, and it's in plural form:

<xs:enumeration value="dsOthers"/>

Unfortunately, I couldn't find a proper .theme file to double check on this.

May I ask you why you believe it's supposed to be Other instead of Others? Is it due to a change in pandoc 3?

I remember to extracting the pandoc theme elements names for this project involved quite a lot of work back then, since themes were being converted from Kate format and not stored in their final form; also, as mentioned, some elements (like this one) were rarely covered by themes, and had to either discover them by sifting themes or through Kate documentation.

Just want to make sure it was a typo indeed, before changing it.

@tflexs
Copy link
Author

tflexs commented Mar 28, 2023

Thanks @tajmone !
Perhaps the issue is more complicated than I thought... I used this template (for a quarto HTML document) and noticed that the colour I had under Others wasn't being applied correctly. I changed it to Other just to try it, and it worked.

Reprex

example.qmd

---
title: "Title"
format:
  html:
    highlight-style: "mytheme.theme"
---

If `Other` is correct, assignment operator will appear red.
If `Others` is correct, assignment operator will appear green.

```{r}
foo <- 1
```

mytheme.theme

{
  "text-styles": {
    "Other": {
      "text-color": "#ff0000"
    },
    "Others": {
      "text-color": "#00ff00"
    }
  }
}

Output

image

Info

  • Pandoc version: 3.1.1
  • Quarto version: 1.3.290

@tajmone
Copy link
Owner

tajmone commented Mar 28, 2023

Ok. I don't know the Quarto tool, but I got your point.

Just give me some time to look into it, it might well be that there have been changes with the new pandoc version 3.

The main problem is that the repository hasn't been updated since pandoc v2, so if it's a pandoc 3 issue it will have to be postponed to when I update the whole project to pandoc 3 (which will take considerable work, but I've been thinking about it).

But I also want to look again into the Skylighting themes and its elements naming conventions, to see what the correct name for that element is — again, might take some time since I remember that there wasn't a dedicated documentation for it, only sample themes to look at (and the Other/Others element is rarely found (and might even be absent, and I just deduced it from Kate sample, I simply don't remember).

Right now I'm very busy with some other work I need to finish, but as soon as I have some spare time I'll look into it, and this time also annotate my findings in the project (or its Wiki) for future references. So, just bare patient with me for a while and I'll be back to you.

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