Bug 423428

Summary: WARNING: Could not lex literal_block as "cmake"
Product: [Frameworks and Libraries] extra-cmake-modules Reporter: ratijas <me>
Component: generalAssignee: ecm-bugs-null <ecm-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.71.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ratijas 2020-06-24 09:27:22 UTC
SUMMARY

Moved from https://invent.kde.org/frameworks/extra-cmake-modules/-/issues/1

```
/projects/qt/extra-cmake-modules/docs/module/ECMSetupQtPluginMacroNames.rst:89: WARNING: Could not lex literal_block as "cmake". Highlighting skipped.
```

`modules/ECMSetupQtPluginMacroNames.cmake`:
```
# .. code-block:: cmake
#
#   @PACKAGE_SETUP_AUTOMOC_VARIABLES@
#
```

Strictly speaking this is not a cmake block but rather cmake.in. Unfortunately, Pygments library doesn't support that. I don't know workarounds for cases like this one.

STEPS TO REPRODUCE
1. Build the documentation with `cmake && make`

OBSERVED RESULT

WARNING: Could not lex literal_block as "cmake". Highlighting skipped.

EXPECTED RESULT

No warning.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Not relevant
(available in About System)
KDE Plasma Version: Not relevant
KDE Frameworks Version: Not relevant
Qt Version: Not relevant

ADDITIONAL INFORMATION

Python 3.8
sphinx-build 3.1.1
Pygments version 2.6.1