skylighting-core 0.8.3.4 → 0.8.4
raw patch · 3 files changed
+16/−2 lines, 3 files
Files
- changelog.md +8/−0
- skylighting-core.cabal +1/−1
- src/Skylighting/Format/HTML.hs +7/−1
changelog.md view
@@ -1,5 +1,13 @@ # Revision history for skylighting and skylighting-core +## 0.8.4++ * HTML output: use aria-hidden="true" on empty a elements+ unless numberLines is specified (in which case the element+ is still empty but will have content added by CSS).+ This is to avoid excess noise when the code blocks are+ read by screen readers. See jgm/pandoc#6352.+ ## 0.8.3.4 * Update syntax descriptions for: cmake agda c coffee doxygenlua html
skylighting-core.cabal view
@@ -1,5 +1,5 @@ name: skylighting-core-version: 0.8.3.4+version: 0.8.4 synopsis: syntax highlighting library description: Skylighting is a syntax highlighting library. It derives its tokenizers from XML syntax
src/Skylighting/Format/HTML.hs view
@@ -12,6 +12,7 @@ import Text.Blaze.Html import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A+import Data.String (fromString) #if !MIN_VERSION_base(4,11,0) import Data.Semigroup #endif@@ -89,7 +90,12 @@ sourceLineToHtml opts lno cont = H.span ! A.id lineNum $ do- H.a ! A.href lineRef $ mempty+ H.a ! A.href lineRef+ ! (if numberLines opts+ then mempty+ else customAttribute (fromString "aria-hidden")+ (fromString "true")) -- see jgm/pandoc#6352+ $ mempty mapM_ (tokenToHtml opts) cont where lineNum = toValue prefixedLineNo lineRef = toValue ('#':prefixedLineNo)