Skip to content

A quarto extension to strip raw HTML blocks (such as '<style>') that are disallowed by GFM.

Notifications You must be signed in to change notification settings

restlessronin/gfm-strip-disallowed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gfm-strip-disallowed Extension For Quarto

GFM explicitly disallows certain raw html tags.

This filter is a quick solution to remove this markup in the cases where the input contains the diallowed tags.

In particular I needed it to for the index.ipynb file of an nbdev project, which is converted to the Github README.md.

Installing

quarto add restlessronin/gfm-strip-disallowed

This will install the extension under the _extensions subdirectory. Correct installation on an nbdev repo requires running this command in the nbs sub folder. The extension should be committed to version control.

Using

Add the following to your front matter.

format:
  gfm:
    filters:
      - gfm-strip-disallowed

Example

Here is the source code for a minimal example: example.qmd. Running quarto render example.qmd in the root dir of this repo generates the example.md with stripped tags.

nbdev example

The extension was initially created for the README.md of this nbdev github repository. Look at the first cell of nbs/index.ipynb (it's a raw cell, so it will not render correctly on the GitHub website).

About

A quarto extension to strip raw HTML blocks (such as '<style>') that are disallowed by GFM.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages