Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/charmbracelet/glamour
/ functions
Functions
282 in github.com/charmbracelet/glamour
⨍
Functions
282
◇
Types & classes
53
Function
TestCheckImageSize
(t *testing.T)
ansi/image_test.go:462
Function
TestClassifyImageURL
(t *testing.T)
ansi/image_test.go:517
Function
TestCodeBlockChromaStyleBadColor
TestCodeBlockChromaStyleBadColor checks that a chroma color chroma cannot parse is returned as an error and does not panic. An ANSI number or a color
ansi/codeblock_test.go:68
Function
TestCodeBlockChromaStyleIsPerRender
TestCodeBlockChromaStyleIsPerRender renders the same code block with different chroma styles in one process. Each render must carry its own colors, no
ansi/codeblock_test.go:37
Function
TestCustomStyle
TestCustomStyle checks the expected errors with custom styling. We need to support built-in styles and custom style sheets.
glamour_test.go:137
Function
TestDataURLImages
TestDataURLImages ensures inline data: images render, since they involve no network access.
ansi/image_test.go:601
Function
TestDecodeDataURL
(t *testing.T)
ansi/image_test.go:555
Function
TestDetect
(t *testing.T)
internal/autolink/autolink_test.go:9
Function
TestDownscaleImage
(t *testing.T)
ansi/image_test.go:262
Function
TestImageDisplaySize
(t *testing.T)
ansi/image_test.go:210
Function
TestImageOrderInHTMLBlocks
TestImageOrderInHTMLBlocks checks that images are drawn in the order they appear in the document: HTML blocks are not wrapped, so their images can be
ansi/svg_test.go:526
Function
TestImageProtocol
(t *testing.T)
ansi/image_test.go:45
Function
TestImageProtocolKittyPlaceholders
(t *testing.T)
ansi/image_test.go:106
Function
TestImageTooLargeIsSkipped
TestImageTooLargeIsSkipped ensures that images whose header declares huge dimensions are never decoded. Without the size check, decoding a GIF like th
ansi/image_test.go:495
Function
TestImageURLHiddenWhenDisplayed
TestImageURLHiddenWhenDisplayed checks that an image that is displayed is rendered without its URL, which would only be redundant next to it, and that
ansi/image_test.go:653
Function
TestIndentWriterCloseOrder
TestIndentWriterCloseOrder guards against a use-after-close crash in the writer chain. IndentWriter.pw wraps IndentWriter.w, so closing w before pw us
ansi/margin_test.go:15
Function
TestInlineBadges
TestInlineBadges checks that images that are one cell row tall, e.g. badges, are drawn in the text flow, so images next to each other stay on one line
ansi/svg_test.go:474
Function
TestInvalidSVG
TestInvalidSVG checks that an unparsable SVG is not rendered as an image: its URL stays in the output instead.
ansi/image_test.go:931
Function
TestIsSVGData
TestIsSVGData checks the SVG content sniffer.
ansi/image_test.go:947
Function
TestLocalImagePath
(t *testing.T)
ansi/image_test.go:406
Function
TestNormalizeSVGColors
TestNormalizeSVGColors checks that rgba() fill and stroke colors, which the parser rejects, are rewritten into an rgb() color plus an opacity attribut
ansi/svg_test.go:590
Function
TestNormalizeSVGPath
TestNormalizeSVGPath checks that path data is rewritten into a form parsers read reliably.
ansi/svg_test.go:367
Function
TestNormalizeSVGPaths
TestNormalizeSVGPaths checks that the path data of a document is rewritten without touching other attributes.
ansi/svg_test.go:425
Function
TestParseSVGColor
TestParseSVGColor checks the color formats found in SVG documents.
ansi/svg_test.go:219
Function
TestPerRendererImageCaches
(t *testing.T)
ansi/image_test.go:777
Function
TestRemoteImageNotLoadedNote
(t *testing.T)
ansi/image_test.go:686
Function
TestRemoteImageSizeLimit
(t *testing.T)
ansi/image_test.go:744
Function
TestRemoteImages
(t *testing.T)
ansi/image_test.go:614
Function
TestRemoteSVGImages
TestRemoteSVGImages checks that remote SVG images are fetched, rasterized and rendered, whatever their content type.
ansi/image_test.go:884
Function
TestRenderHelpers
(t *testing.T)
glamour_test.go:175
Function
TestRenderer
(t *testing.T)
ansi/renderer_test.go:25
Function
TestRendererIssues
(t *testing.T)
ansi/renderer_test.go:92
Function
TestResolveRelativeURL
(t *testing.T)
ansi/renderer_test.go:151
Function
TestSVGArcsRender
TestSVGArcsRender checks that paths with arcs are drawn, and that the document's shapes are all rendered.
ansi/svg_test.go:435
Function
TestSVGBadgeRendering
TestSVGBadgeRendering checks that a badge is displayed at its own size and that its text is drawn, as oksvg alone would leave the badge without one.
ansi/svg_test.go:86
Function
TestSVGDataURLImages
TestSVGDataURLImages checks that SVG images embedded as data URIs are rendered.
ansi/image_test.go:903
Function
TestSVGDisplaySize
TestSVGDisplaySize checks that SVG images are sized by their intrinsic CSS pixel size, i.e. one cell per cellPixelWidth x cellPixelHeight pixels.
ansi/svg_test.go:32
Function
TestSVGImageConfig
TestSVGImageConfig checks that an SVG's intrinsic size is read from its document, and that a document without one is rejected.
ansi/svg_test.go:258
Function
TestSVGImageRaster
TestSVGImageRaster is a sanity check that rasterizing an SVG yields an image with the badge's colors.
ansi/svg_test.go:336
Function
TestSVGImageRenders
TestSVGImageRenders checks that an SVG image is rendered in a document, sized to its intrinsic size in cells.
ansi/svg_test.go:303
Function
TestSVGImages
TestSVGImages checks that SVG images are rasterized and rendered via the graphics protocols.
ansi/image_test.go:853
Function
TestSVGRGBAGroupRender
TestSVGRGBAGroupRender checks that a transparent rgba() color on a group doesn't hide the children that set their own color.
ansi/svg_test.go:708
Function
TestSVGRGBAOverlayRender
TestSVGRGBAOverlayRender checks that a document with an rgba() overlay, as badges use for their transparent link areas, is drawn, and that the overlay
ansi/svg_test.go:674
Function
TestSVGRasterScale
TestSVGRasterScale checks that scaling an SVG keeps its aspect ratio and that the text stays on the image.
ansi/svg_test.go:276
Function
TestSVGTextRuns
TestSVGTextRuns checks the attributes the text parser resolves.
ansi/svg_test.go:161
Function
TestSVGTextRunsMalformed
TestSVGTextRunsMalformed checks that a broken document doesn't panic and keeps the text parsed up to the point where it breaks.
ansi/svg_test.go:249
Function
TestSVGWithoutSize
TestSVGWithoutSize checks that an SVG without an intrinsic size is not rendered as an image: its URL stays in the output instead.
ansi/image_test.go:914
Function
TestScaleToCells
TestScaleToCells checks that scaling to a cell box uses the physical pixel size of a cell, so a sixel fills the space it reserves. A 40x10 cell box is
ansi/image_test.go:279
Function
TestSixelImageSize
TestSixelImageSize checks that a sixel is encoded at the pixel size of the cell box it reserves: a cell is roughly 10x20 pixels, so encoding the image
ansi/image_test.go:304
Function
TestStyles
(t *testing.T)
glamour_test.go:114
Function
TestTableAscii
(t *testing.T)
glamour_test.go:223
Function
TestTermRenderer
(t *testing.T)
glamour_test.go:50
Function
TestTermRendererWriter
(t *testing.T)
glamour_test.go:20
Function
TestWithChromaFormatterCustom
(t *testing.T)
glamour_test.go:380
Function
TestWithChromaFormatterDefault
(t *testing.T)
glamour_test.go:359
Function
TestWithEmoji
(t *testing.T)
glamour_test.go:71
Function
TestWithHyperlinkModeAuto
(t *testing.T)
glamour_test.go:307
Function
TestWithHyperlinkModeInline
(t *testing.T)
glamour_test.go:252
Function
TestWithHyperlinkModeInlineWithBase
(t *testing.T)
glamour_test.go:279
Function
TestWithPreservedNewLines
(t *testing.T)
glamour_test.go:93
Function
TestWriteKittyImageTransmission
(t *testing.T)
ansi/image_test.go:327
Function
TestWriteKittyImageTransmissionOverSSH
(t *testing.T)
ansi/image_test.go:377
Function
WithImageProtocol
WithImageProtocol sets the graphics protocol used to render images inline. Supported protocols are [ansi.ImageProtocolKitty], [ansi.ImageProtocolSixel
glamour.go:246
Function
WithInlineTableLinks
WithInlineTableLinks forces tables to render links inline. By default,links are rendered as a list of links at the bottom of the table.
glamour.go:194
Function
WithMaxImagePixels
WithMaxImagePixels limits the number of pixels of images that are decoded and displayed. Images exceeding the limit are skipped, since decoding them c
glamour.go:270
Function
WithMaxImageSize
WithMaxImageSize limits the size of rendered images to the given number of terminal columns and rows, in addition to the constraints of the surroundin
glamour.go:257
Function
WithOptions
WithOptions sets multiple TermRenderer options within a single TermRendererOption.
glamour.go:302
Function
WithRemoteImageNotLoadedNote
WithRemoteImageNotLoadedNote sets the note appended right after the URL of a remote image that wasn't loaded because remote image loading is disabled
glamour.go:294
Function
WithRemoteImages
WithRemoteImages enables loading images referenced by http(s) URLs. Remote images are disabled by default: fetching them reveals the reader's IP addre
glamour.go:281
Function
WithStylesFromJSONBytes
WithStylesFromJSONBytes sets a TermRenderer's styles by parsing styles from jsonBytes.
glamour.go:157
Function
WithStylesFromJSONFile
WithStylesFromJSONFile sets a TermRenderer's styles from a JSON file.
glamour.go:164
Function
WithTableWrap
WithTableWrap controls whether table content will wrap if too long. This is true by default. If false, table content will be truncated with an ellipsi
glamour.go:185
Method
Write
Write writes to the padding writer.
ansi/margin.go:88
Method
Write
Write writes to the indentation writer.
ansi/margin.go:186
Method
Write
(p []byte)
ansi/margin_test.go:44
Function
main
()
internal/generate-style-json/main.go:37
Function
main
()
examples/helloworld/main.go:9
Function
main
()
examples/stdin-stdout-custom-styles/main.go:22
Function
main
()
examples/stdin-stdout/main.go:22
Function
main
()
examples/artichokes/main.go:20
Function
main
()
examples/custom_renderer/main.go:9
Method
renderNode
(w util.BufWriter, source []byte, node ast.Node, entering bool)
ansi/renderer.go:166
← previous
201–282 of 282, ranked by callers