Syntax highlighting styles in inline code missing background color
- Dominant language
- Haskell
- Stars
- 218
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Pandoc doesn't apply full syntax highlighting styles for inline code. In particular, the background in inline code does not change. This makes inline code reading a bit difficult since it doesn't stand out from the surrounding text.
The problem didn't exist in older Pandoc versions. I'm getting this issue with 3.7.0.2 version, but can't pinpoint the exact version when the problem occured first since I've had quite a long break using Pandoc.
Here's the code:
```markdown
+ let's see here: `man git`{.bash}
+ and here:
```bash
man git
```
```
Pandoc run for HTML:
```bash
pandoc -f markdown+backtick_code_blocks+fenced_code_attributes+inline_code_attributes -ps --highlight-style=espresso -o out.html in.md
```
Result: inline code is not on dark background, as opposed to code blocks:
I'm attaching the input file (MRE/MWE) and Makefile for easy testing.
Details:
Pandoc 3.7.0.2
openSUSE Tumbleweed
Kernel: 6.16.3-1
[in.md](https://github.com/user-attachments/files/22060087/in.md)
Makefile:
```makefile
file_in := in.md
file_out_html := out.html
file_out_pdf := out.pdf
all : out.html out.pdf
pandoc_run = pandoc -f markdown+backtick_code_blocks+fenced_code_attributes+inline_code_attributes -p $(1) --highlight-style=espresso -o $@ $<
$(file_out_html) : $(file_in)
$(call pandoc_run,-s)
$(file_out_pdf) : $(file_in)
$(pandoc_run)
.PHONY : clean
clean :
$(RM) $(file_out_html) $(file_out_pdf)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the provided Makefile with in.md and the Pandoc command using the espresso highlight style to reproduce the difference between inline code and code blocks. Trace how Skylighting handles inline code versus fenced blocks; done means inline code receives the expected background styling, with the reproduction confirming the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100