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

Filter: remove attributes from code blocks (hugo) #168

Merged
merged 6 commits into from
Sep 2, 2023
Merged

Filter: remove attributes from code blocks (hugo) #168

merged 6 commits into from
Sep 2, 2023

Conversation

cagix
Copy link
Owner

@cagix cagix commented Sep 2, 2023

In order to get proper syntax highlighting when using Hugo,

  • remove attributes from codeblocks, and
  • remove classes and attributes from inline code.

Examples:

``` {.haskell size="tiny"}
class Monad m where
    (>>=) :: m a -> (a -> m b) -> m b
    return :: a -> m a
```

and

`void`{.c}

would not be recognised by Hugo. Thus this PR introduces some preprocessing and the hugo.lua filter will emit

``` haskell
class Monad m where
    (>>=) :: m a -> (a -> m b) -> m b
    return :: a -> m a
```

and

`void`

fixes #83

@cagix cagix self-assigned this Sep 2, 2023
filters/hugo.lua Outdated Show resolved Hide resolved
@cagix cagix merged commit 91a7760 into master Sep 2, 2023
1 check passed
@cagix cagix deleted the fix-83 branch September 2, 2023 17:14
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.

[Filter] Entferne Attribute an Code-Blöcken (hugo.lua)
1 participant