repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/printer.rs
src/terminal/image/printer.rs
use super::{ Image, ImageSource, protocols::{ ascii::{AsciiImage, AsciiPrinter}, iterm::{ItermImage, ItermPrinter}, kitty::{KittyImage, KittyPrinter}, raw::{RawImage, RawPrinter}, }, }; use crate::{ markdown::text_style::{Color, PaletteColorError}, terminal::{ ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/scale.rs
src/terminal/image/scale.rs
use crate::render::properties::{CursorPosition, WindowSize}; pub(crate) trait ScaleImage { /// Scale an image to a specific size. fn scale_image( &self, scale_size: &WindowSize, window_dimensions: &WindowSize, image_width: u32, image_height: u32, position: &Curso...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/mod.rs
src/terminal/image/mod.rs
use self::printer::{ImageProperties, TerminalImage}; use image::DynamicImage; use protocols::ascii::AsciiImage; use std::{ fmt::Debug, ops::Deref, path::PathBuf, sync::{Arc, Mutex}, }; pub(crate) mod printer; pub(crate) mod protocols; pub(crate) mod scale; struct Inner { image: TerminalImage, ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/protocols/ascii.rs
src/terminal/image/protocols/ascii.rs
use crate::{ markdown::text_style::{Color, Colors, TextStyle}, terminal::{ image::printer::{ImageProperties, ImageSpec, PrintImage, PrintImageError, PrintOptions, RegisterImageError}, printer::{TerminalCommand, TerminalIo}, }, }; use image::{DynamicImage, GenericImageView, Pixel, Rgba, RgbaI...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/protocols/iterm.rs
src/terminal/image/protocols/iterm.rs
use crate::terminal::{ image::printer::{ImageProperties, ImageSpec, PrintImage, PrintImageError, PrintOptions, RegisterImageError}, printer::{TerminalCommand, TerminalIo}, }; use base64::{Engine, engine::general_purpose::STANDARD}; use image::{GenericImageView, ImageEncoder, RgbaImage, codecs::png::PngEncoder};...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/protocols/kitty.rs
src/terminal/image/protocols/kitty.rs
use crate::{ markdown::text_style::{Color, TextStyle}, terminal::{ image::printer::{ImageProperties, ImageSpec, PrintImage, PrintImageError, PrintOptions, RegisterImageError}, printer::{TerminalCommand, TerminalIo}, }, }; use base64::{Engine, engine::general_purpose::STANDARD}; use image::{A...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/protocols/raw.rs
src/terminal/image/protocols/raw.rs
use crate::terminal::{ image::printer::{ImageProperties, ImageSpec, PrintImage, PrintImageError, PrintOptions, RegisterImageError}, printer::TerminalIo, }; use base64::{Engine, engine::general_purpose::STANDARD}; use image::{GenericImageView, ImageEncoder, ImageFormat, codecs::png::PngEncoder}; use std::fs; pu...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/protocols/sixel.rs
src/terminal/image/protocols/sixel.rs
use crate::terminal::{ image::printer::{ CreatePrinterError, ImageProperties, ImageSpec, PrintImage, PrintImageError, PrintOptions, RegisterImageError, }, printer::{TerminalCommand, TerminalIo}, }; use image::{DynamicImage, GenericImageView, RgbaImage, imageops::FilterType}; use sixel_rs::{ enco...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/terminal/image/protocols/mod.rs
src/terminal/image/protocols/mod.rs
pub(crate) mod ascii; pub(crate) mod iterm; pub(crate) mod kitty; pub(crate) mod raw; #[cfg(feature = "sixel")] pub(crate) mod sixel;
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/theme/registry.rs
src/theme/registry.rs
use super::raw::PresentationTheme; use std::{ collections::BTreeMap, fs, io, path::{Path, PathBuf}, }; include!(concat!(env!("OUT_DIR"), "/themes.rs")); #[derive(Default)] pub struct PresentationThemeRegistry { custom_themes: BTreeMap<String, PresentationTheme>, } impl PresentationThemeRegistry { ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/theme/raw.rs
src/theme/raw.rs
use super::registry::LoadThemeError; use crate::markdown::text_style::{Color, Colors, UndefinedPaletteColorError}; use hex::{FromHex, FromHexError}; use serde::{Deserialize, Serialize, de::Visitor}; use std::{ collections::BTreeMap, fmt, fs, path::{Path, PathBuf}, str::FromStr, }; pub(crate) type RawCo...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/theme/mod.rs
src/theme/mod.rs
pub(crate) mod clean; pub(crate) mod raw; pub(crate) mod registry; pub(crate) use clean::*; pub(crate) use raw::{AuthorPositioning, FooterTemplate, FooterTemplateChunk, Margin};
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/theme/clean.rs
src/theme/clean.rs
use super::{ AuthorPositioning, FooterTemplate, Margin, raw::{self, RawColor}, }; use crate::{ markdown::text_style::{Color, Colors, TextStyle, UndefinedPaletteColorError}, resource::Resources, terminal::image::{Image, printer::RegisterImageError}, }; use std::collections::BTreeMap; const DEFAULT_C...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/engine.rs
src/render/engine.rs
use super::{ RenderError, RenderResult, layout::Layout, operation::ImagePosition, properties::CursorPosition, text::TextDrawer, }; use crate::{ config::{MaxColumnsAlignment, MaxRowsAlignment}, markdown::{text::WeightedLine, text_style::Colors}, render::{ operation::{ AsRenderOperatio...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
true
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/properties.rs
src/render/properties.rs
use crossterm::terminal; use std::io::{self, ErrorKind}; /// The size of the terminal window. /// /// This is the same as [crossterm::terminal::window_size] except with some added functionality, /// like implementing `Clone`. #[derive(Debug, Clone, Copy, PartialEq)] pub(crate) struct WindowSize { pub(crate) rows: ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/ascii_scaler.rs
src/render/ascii_scaler.rs
use super::{ RenderError, engine::{RenderEngine, RenderEngineOptions}, }; use crate::{ WindowSize, presentation::Presentation, terminal::{ image::Image, printer::{TerminalCommand, TerminalError, TerminalIo}, }, }; use std::thread; use unicode_width::UnicodeWidthStr; pub(crate) s...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/text.rs
src/render/text.rs
use crate::{ markdown::{ elements::Text, text::{WeightedLine, WeightedText}, text_style::{Color, Colors, TextStyle}, }, render::{RenderError, RenderResult, layout::Positioning}, terminal::printer::{TerminalCommand, TerminalIo}, }; /// Draws text on the screen. /// /// This deals...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/mod.rs
src/render/mod.rs
pub(crate) mod ascii_scaler; pub(crate) mod engine; pub(crate) mod layout; pub(crate) mod operation; pub(crate) mod properties; pub(crate) mod text; pub(crate) mod validate; use crate::{ markdown::{ elements::Text, text::WeightedLine, text_style::{Color, Colors, PaletteColorError, TextStyle...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/layout.rs
src/render/layout.rs
use crate::{render::properties::WindowSize, theme::Alignment}; #[derive(Debug)] pub(crate) struct Layout { alignment: Alignment, start_column_offset: u16, font_size: u16, } impl Layout { pub(crate) fn new(alignment: Alignment) -> Self { Self { alignment, start_column_offset: 0, font_size: 1 } ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/validate.rs
src/render/validate.rs
use super::properties::WindowSize; use crate::{ ImagePrinter, presentation::Presentation, render::{ RenderError, engine::{RenderEngine, RenderEngineOptions}, }, terminal::{Terminal, TerminalWrite}, }; use std::{io, sync::Arc}; pub(crate) struct OverflowValidator; impl OverflowValid...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/render/operation.rs
src/render/operation.rs
use super::properties::WindowSize; use crate::{ markdown::{ text::{WeightedLine, WeightedText}, text_style::{Color, Colors, TextStyle}, }, terminal::image::Image, theme::{Alignment, Margin}, }; use std::{ fmt::Debug, rc::Rc, sync::{Arc, Mutex}, }; const DEFAULT_IMAGE_Z_INDEX...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/export/html.rs
src/export/html.rs
use crate::markdown::text_style::{Color, TextAttribute, TextStyle}; use std::{borrow::Cow, fmt}; pub(crate) enum HtmlText { Plain(String), Styled { text: String, style: String }, } impl HtmlText { pub(crate) fn new(text: &str, style: &TextStyle, font_size: FontSize) -> Self { let mut text = text.t...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/export/exporter.rs
src/export/exporter.rs
use crate::{ MarkdownParser, Resources, code::execute::SnippetExecutor, config::{KeyBindingsConfig, PauseExportPolicy, PdfExportConfig, SnippetsExportPolicy}, export::output::{ExportRenderer, OutputFormat}, markdown::text_style::Color, presentation::{ Presentation, builder::{Pres...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/export/mod.rs
src/export/mod.rs
pub mod exporter; pub(crate) mod html; pub(crate) mod output;
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/export/output.rs
src/export/output.rs
use super::{ exporter::{ExportError, OutputDirectory}, html::{FontSize, color_to_html}, }; use crate::{ config::ExportFontsConfig, export::html::HtmlText, markdown::text_style::TextStyle, presentation::Slide, render::{engine::RenderEngine, properties::WindowSize}, terminal::{ ima...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/footer.rs
src/ui/footer.rs
use crate::{ markdown::{ elements::{Line, Text}, parse::{MarkdownParser, ParseInlinesError}, text_style::{TextStyle, UndefinedPaletteColorError}, }, render::{ operation::{AsRenderOperations, ImagePosition, ImageRenderProperties, MarginProperties, RenderOperation}, pro...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/separator.rs
src/ui/separator.rs
use crate::{ markdown::{ elements::{Line, Text}, text_style::TextStyle, }, render::{ layout::{Layout, Positioning}, operation::{AsRenderOperations, BlockLine, RenderOperation}, properties::WindowSize, }, theme::{Alignment, Margin}, }; use std::rc::Rc; #[deriv...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/mod.rs
src/ui/mod.rs
pub(crate) mod execution; pub(crate) mod footer; pub(crate) mod modals; pub(crate) mod separator;
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/modals.rs
src/ui/modals.rs
use crate::{ code::padding::NumberPadder, commands::keyboard::KeyBinding, config::KeyBindingsConfig, markdown::{ elements::{Line, Text}, text::WeightedLine, text_style::TextStyle, }, presentation::PresentationState, render::{ operation::{ AsRenderO...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/execution/image.rs
src/ui/execution/image.rs
use crate::{ code::{ execute::{ExecutionHandle, LanguageSnippetExecutor, ProcessStatus}, snippet::Snippet, }, markdown::elements::Text, render::{ operation::{ AsRenderOperations, ImageRenderProperties, Pollable, PollableState, RenderAsync, RenderAsyncStartPolicy, ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/execution/disabled.rs
src/ui/execution/disabled.rs
use crate::{ markdown::{elements::Text, text_style::TextStyle}, render::{ operation::{AsRenderOperations, Pollable, RenderAsync, RenderAsyncStartPolicy, RenderOperation, ToggleState}, properties::WindowSize, }, theme::Alignment, }; use std::sync::{Arc, Mutex}; #[derive(Clone, Debug)] pu...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/execution/acquire_terminal.rs
src/ui/execution/acquire_terminal.rs
use crate::{ code::{execute::LanguageSnippetExecutor, snippet::Snippet}, markdown::elements::{Line, Text}, render::{ operation::{AsRenderOperations, Pollable, PollableState, RenderAsync, RenderOperation}, properties::WindowSize, }, terminal::should_hide_cursor, theme::{Alignment,...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/execution/pty.rs
src/ui/execution/pty.rs
use crate::{ code::{ execute::{LanguageSnippetExecutor, ProcessStatus, PtySnippetContext}, snippet::{PtyArgs, Snippet}, }, markdown::{ elements::{Line, Text}, text_style::{Color, TextStyle}, }, render::{ operation::{ AsRenderOperations, BlockLine, ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/execution/mod.rs
src/ui/execution/mod.rs
pub(crate) mod acquire_terminal; pub(crate) mod disabled; pub(crate) mod image; pub(crate) mod output; pub(crate) mod pty; pub(crate) mod validator; pub(crate) use acquire_terminal::RunAcquireTerminalSnippet; pub(crate) use disabled::SnippetExecutionDisabledOperation; pub(crate) use image::RunImageSnippet; pub(crate) ...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/execution/validator.rs
src/ui/execution/validator.rs
use crate::{ code::{ execute::{ExecutionHandle, LanguageSnippetExecutor, ProcessStatus}, snippet::{ExpectedSnippetExecutionResult, Snippet}, }, render::operation::{ AsRenderOperations, Pollable, PollableState, RenderAsync, RenderAsyncStartPolicy, RenderOperation, }, }; use std::{...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/ui/execution/output.rs
src/ui/execution/output.rs
use crate::{ code::{ execute::{ExecutionHandle, ExecutionState, LanguageSnippetExecutor, ProcessStatus}, snippet::Snippet, }, markdown::{ elements::{Line, Text}, text_style::{Colors, TextStyle}, }, render::{ operation::{ AsRenderOperations, BlockLi...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/markdown/html.rs
src/markdown/html.rs
use super::text_style::{Color, TextStyle}; use crate::theme::raw::{ParseColorError, RawColor}; use std::{borrow::Cow, str, str::Utf8Error}; use tl::Attributes; pub(crate) struct HtmlParseOptions { pub(crate) strict: bool, } impl Default for HtmlParseOptions { fn default() -> Self { Self { strict: true...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/markdown/parse.rs
src/markdown/parse.rs
use super::{ elements::{Line, ListItem, ListItemType, MarkdownElement, SourcePosition, Table, TableRow, Text}, html::{HtmlInline, HtmlParser, ParseHtmlError}, text_style::TextStyle, }; use crate::{markdown::html::HtmlTag, theme::raw::RawColor}; use comrak::{ Arena, Options, arena_tree::Node, for...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
true
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/markdown/text.rs
src/markdown/text.rs
use super::{ elements::{Line, Text}, text_style::TextStyle, }; use std::{fmt, mem}; use unicode_width::{UnicodeWidthChar, UnicodeWidthStr}; /// A weighted line of text. /// /// The weight of a character is its given by its width in unicode. #[derive(Clone, Debug, Default, PartialEq, Eq)] pub(crate) struct Weig...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/markdown/text_style.rs
src/markdown/text_style.rs
use crate::{ terminal::capabilities::TerminalCapabilities, theme::{ColorPalette, raw::RawColor}, }; use crossterm::style::{ContentStyle, StyledContent, Stylize}; use serde::{Deserialize, Serialize}; use std::{ borrow::Cow, fmt::{self, Display}, }; /// The style of a piece of text. #[derive(Clone, Copy,...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/markdown/mod.rs
src/markdown/mod.rs
pub(crate) mod elements; pub(crate) mod html; pub(crate) mod parse; pub(crate) mod text; pub(crate) mod text_style;
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
mfontanini/presenterm
https://github.com/mfontanini/presenterm/blob/b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e/src/markdown/elements.rs
src/markdown/elements.rs
use super::text_style::{Color, TextStyle, UndefinedPaletteColorError}; use crate::theme::{ColorPalette, raw::RawColor}; use comrak::nodes::AlertType; use std::{fmt, iter, path::PathBuf, str::FromStr}; use unicode_width::UnicodeWidthStr; /// A markdown element. /// /// This represents each of the supported markdown ele...
rust
BSD-2-Clause
b2169cbe53ee3c82196a9bb1d69ba300d2cbfa4e
2026-01-04T15:49:50.845256Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_jsx.rs
fuzz/fuzz_targets/rome_parse_jsx.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::jsx(); rome_common::fuzz_js_parser_with_source_type(case, parse_type) } #[cfg(not(...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_d_ts.rs
fuzz/fuzz_targets/rome_format_d_ts.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::d_ts(); rome_common::fuzz_js_formatter_with_source_type(case, parse_type) } #[cfg(...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_json.rs
fuzz/fuzz_targets/rome_format_json.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { rome_common::fuzz_json_formatter(case) } #[cfg(not(feature = "rome_all"))] libfuzzer_sys::fuzz_target!(|case: &[u8]| -> Corpus { do_fuzz(case) });
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_all.rs
fuzz/fuzz_targets/rome_format_all.rs
#![no_main] mod rome_format_d_ts; mod rome_format_jsx; mod rome_format_module; mod rome_format_script; mod rome_format_tsx; mod rome_format_typescript; use libfuzzer_sys::{fuzz_target, Corpus}; fn do_fuzz(data: &[u8]) -> Corpus { let mut keep = Corpus::Reject; if let Corpus::Keep = rome_format_d_ts::do_fuzz(...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_typescript.rs
fuzz/fuzz_targets/rome_parse_typescript.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::ts(); rome_common::fuzz_js_parser_with_source_type(case, parse_type) } #[cfg(not(f...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_module.rs
fuzz/fuzz_targets/rome_format_module.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::js_module(); rome_common::fuzz_js_formatter_with_source_type(case, parse_type) } #...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_module.rs
fuzz/fuzz_targets/rome_parse_module.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::js_module(); rome_common::fuzz_js_parser_with_source_type(case, parse_type) } #[cf...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_d_ts.rs
fuzz/fuzz_targets/rome_parse_d_ts.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::d_ts(); rome_common::fuzz_js_parser_with_source_type(case, parse_type) } #[cfg(not...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_script.rs
fuzz/fuzz_targets/rome_format_script.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::js_script(); rome_common::fuzz_js_formatter_with_source_type(case, parse_type) } #...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_typescript.rs
fuzz/fuzz_targets/rome_format_typescript.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::ts(); rome_common::fuzz_js_formatter_with_source_type(case, parse_type) } #[cfg(no...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_all.rs
fuzz/fuzz_targets/rome_parse_all.rs
#![no_main] mod rome_parse_d_ts; mod rome_parse_jsx; mod rome_parse_module; mod rome_parse_script; mod rome_parse_tsx; mod rome_parse_typescript; use libfuzzer_sys::{fuzz_target, Corpus}; fn do_fuzz(data: &[u8]) -> Corpus { let mut keep = Corpus::Reject; if let Corpus::Keep = rome_parse_d_ts::do_fuzz(data) {...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_script.rs
fuzz/fuzz_targets/rome_parse_script.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::js_script(); rome_common::fuzz_js_parser_with_source_type(case, parse_type) } #[cf...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_jsx.rs
fuzz/fuzz_targets/rome_format_jsx.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::jsx(); rome_common::fuzz_js_formatter_with_source_type(case, parse_type) } #[cfg(n...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_common.rs
fuzz/fuzz_targets/rome_common.rs
//! Common functionality between different fuzzers. Look here if you need to inspect implementation //! details for the fuzzer harnesses! #![expect(dead_code)] use biome_analyze::{AnalysisFilter, AnalyzerOptions, ControlFlow, RuleFilter}; use biome_diagnostics::Diagnostic; use biome_formatter::format_node; use biome_...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_format_tsx.rs
fuzz/fuzz_targets/rome_format_tsx.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::tsx(); rome_common::fuzz_js_formatter_with_source_type(case, parse_type) } #[cfg(n...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_tsx.rs
fuzz/fuzz_targets/rome_parse_tsx.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use biome_js_syntax::JsFileSource; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { let parse_type = JsFileSource::tsx(); rome_common::fuzz_js_parser_with_source_type(case, parse_type) } #[cfg(not(...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/fuzz/fuzz_targets/rome_parse_json.rs
fuzz/fuzz_targets/rome_parse_json.rs
#![cfg_attr(not(feature = "rome_all"), no_main)] #[path = "rome_common.rs"] mod rome_common; use libfuzzer_sys::Corpus; pub fn do_fuzz(case: &[u8]) -> Corpus { rome_common::fuzz_json_parser(case) } #[cfg(not(feature = "rome_all"))] libfuzzer_sys::fuzz_target!(|case: &[u8]| -> Corpus { do_fuzz(case) });
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/lib.rs
crates/biome_tailwind_parser/src/lib.rs
#![deny(clippy::use_self)] mod lexer; mod parser; mod syntax; mod token_source; use crate::parser::{TailwindLosslessTreeSink, TailwindParser}; use crate::syntax::parse_root; use biome_parser::diagnostic::ParseDiagnostic; use biome_rowan::{AstNode, NodeCache}; use biome_tailwind_syntax::{TailwindSyntaxNode, TwRoot}; ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/token_source.rs
crates/biome_tailwind_parser/src/token_source.rs
use crate::lexer::TailwindLexer; use biome_parser::diagnostic::ParseDiagnostic; use biome_parser::lexer::{BufferedLexer, LexContext}; use biome_parser::prelude::BumpWithContext; use biome_parser::token_source::{ TokenSource, TokenSourceCheckpoint, TokenSourceWithBufferedLexer, Trivia, }; use biome_rowan::TriviaPiec...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/parser.rs
crates/biome_tailwind_parser/src/parser.rs
use crate::token_source::{TailwindTokenSource, TailwindTokenSourceCheckpoint}; use biome_parser::diagnostic::{ParseDiagnostic, merge_diagnostics}; use biome_parser::event::Event; use biome_parser::tree_sink::LosslessTreeSink; use biome_parser::{Parser, ParserContext}; use biome_parser::{ParserContextCheckpoint, prelude...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/syntax/value.rs
crates/biome_tailwind_parser/src/syntax/value.rs
use crate::parser::TailwindParser; use crate::syntax::variant::parse_data_attribute; use crate::token_source::TailwindLexContext; use biome_parser::Parser; use biome_parser::parsed_syntax::ParsedSyntax::{Absent, Present}; use biome_parser::prelude::*; use biome_tailwind_syntax::T; use biome_tailwind_syntax::TailwindSyn...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/syntax/mod.rs
crates/biome_tailwind_parser/src/syntax/mod.rs
use crate::parser::TailwindParser; use crate::syntax::parse_error::*; use crate::syntax::value::parse_value; use crate::syntax::variant::VariantList; use crate::token_source::TailwindLexContext; use biome_parser::parse_lists::{ParseNodeList, ParseSeparatedList}; use biome_parser::parsed_syntax::ParsedSyntax::{Absent, P...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/syntax/parse_error.rs
crates/biome_tailwind_parser/src/syntax/parse_error.rs
use biome_parser::diagnostic::expected_node; use biome_parser::prelude::*; use biome_rowan::TextRange; use crate::parser::TailwindParser; pub(crate) fn expected_candidate(p: &TailwindParser, range: TextRange) -> ParseDiagnostic { expected_node("candidate", range, p).into_diagnostic(p) } pub(crate) fn expected_va...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/syntax/variant.rs
crates/biome_tailwind_parser/src/syntax/variant.rs
use crate::parser::TailwindParser; use crate::syntax::parse_error::*; use crate::syntax::value::parse_value; use crate::token_source::TailwindLexContext; use biome_parser::parse_lists::ParseSeparatedList; use biome_parser::parsed_syntax::ParsedSyntax::{Absent, Present}; use biome_parser::{Parser, parse_recovery::ParseR...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/lexer/tests.rs
crates/biome_tailwind_parser/src/lexer/tests.rs
#![cfg(test)] use super::{TailwindLexer, TextSize}; use crate::token_source::TailwindLexContext; use biome_parser::lexer::Lexer; use biome_tailwind_syntax::TailwindSyntaxKind::{self, *}; use quickcheck_macros::quickcheck; use std::sync::mpsc::channel; use std::thread; use std::time::Duration; // This is for testing i...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/lexer/mod.rs
crates/biome_tailwind_parser/src/lexer/mod.rs
mod base_name_store; mod tests; use crate::lexer::base_name_store::{BASENAME_STORE, is_delimiter}; use crate::token_source::TailwindLexContext; use biome_parser::diagnostic::ParseDiagnostic; use biome_parser::lexer::{Lexer, LexerCheckpoint, LexerWithCheckpoint, ReLexer, TokenFlags}; use biome_rowan::{SyntaxKind, TextL...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/src/lexer/base_name_store.rs
crates/biome_tailwind_parser/src/lexer/base_name_store.rs
use std::sync::LazyLock; use biome_tailwind_syntax::metadata::BASENAMES_WITH_DASHES; /// A global store of dashed basenames for efficient reuse across lexing. /// /// Ideally, this will be built by parsing a project's tailwind config, since it can add custom utilities and variants. pub static BASENAME_STORE: LazyLock...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/tests/quick_test.rs
crates/biome_tailwind_parser/tests/quick_test.rs
use biome_tailwind_parser::parse_tailwind; use biome_test_utils::has_bogus_nodes_or_empty_slots; #[ignore] #[test] pub fn quick_test() { let code = r#"group-data-[collapsible=icon]:hidden"#; let root = parse_tailwind(code); let syntax = root.syntax(); dbg!(&syntax, root.diagnostics(), root.has_errors(...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/tests/spec_test.rs
crates/biome_tailwind_parser/tests/spec_test.rs
use biome_console::fmt::{Formatter, Termcolor}; use biome_console::markup; use biome_diagnostics::{DiagnosticExt, PrintDiagnostic, termcolor}; use biome_rowan::{AstNode, SyntaxKind}; use biome_tailwind_parser::parse_tailwind; use biome_tailwind_syntax::TwRoot; use biome_test_utils::{has_bogus_nodes_or_empty_slots, vali...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/tests/spec_tests.rs
crates/biome_tailwind_parser/tests/spec_tests.rs
mod spec_test; mod ok { tests_macros::gen_tests! {"tests/tailwind_specs/ok/**/*.txt", crate::spec_test::run, "ok"} } mod error { tests_macros::gen_tests! {"tests/tailwind_specs/error/**/*.txt", crate::spec_test::run, "error"} }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_tailwind_parser/benches/tailwind_parser.rs
crates/biome_tailwind_parser/benches/tailwind_parser.rs
use std::fs; use std::path::Path; use biome_rowan::NodeCache; use biome_tailwind_parser::{parse_tailwind, parse_tailwind_with_cache}; use criterion::{BenchmarkId, Criterion, Throughput, black_box, criterion_group, criterion_main}; #[cfg(target_os = "windows")] #[global_allocator] static GLOBAL: mimalloc::MiMalloc = m...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_fs/src/path.rs
crates/biome_fs/src/path.rs
//! This module is responsible to manage paths inside Biome. //! It is a small wrapper around [path::Utf8PathBuf] but it is also able to //! give additional information around the file that holds: //! - the [FileHandlers] for the specific file //! - shortcuts to open/write to the file use crate::ConfigName; use camino:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_fs/src/lib.rs
crates/biome_fs/src/lib.rs
#![deny(clippy::use_self)] mod fs; mod interner; mod path; mod utils; pub use fs::{ AutoSearchResult, ConfigName, ErrorEntry, File, FileSystem, FileSystemDiagnostic, FileSystemExt, FsErrorKind, MemoryFileSystem, OpenOptions, OsFileSystem, PathKind, TemporaryFs, TraversalContext, TraversalScope, }; pub use...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_fs/src/interner.rs
crates/biome_fs/src/interner.rs
use camino::Utf8PathBuf; use crossbeam::channel::{Receiver, Sender, unbounded}; use papaya::HashSet; use rustc_hash::FxBuildHasher; pub type PathInternerSet = HashSet<Utf8PathBuf, FxBuildHasher>; /// File paths interner cache /// /// The path interner stores an instance of [PathBuf] #[derive(Debug)] pub struct PathIn...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_fs/src/fs.rs
crates/biome_fs/src/fs.rs
use crate::{BiomePath, PathInterner}; use biome_diagnostics::{Advices, Diagnostic, IoError, LogCategory, Visit, console}; use biome_diagnostics::{Error, Severity}; use camino::{Utf8Path, Utf8PathBuf}; pub use memory::{ErrorEntry, MemoryFileSystem}; pub use os::{OsFileSystem, TemporaryFs}; use serde::{Deserialize, Seria...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_fs/src/utils.rs
crates/biome_fs/src/utils.rs
use std::{ borrow::Cow, env, fs::{self, FileType}, io::ErrorKind as IoErrorKind, path, }; use biome_diagnostics::{DiagnosticExt, Error, IoError, Severity}; use camino::{Utf8Component, Utf8Path, Utf8PathBuf}; use directories::ProjectDirs; use tracing::warn; use crate::{FileSystemDiagnostic, FsError...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_fs/src/fs/os.rs
crates/biome_fs/src/fs/os.rs
//! Implementation of the [FileSystem] and related traits for the underlying OS filesystem use std::env::temp_dir; use std::fs::{FileType, Metadata}; use std::process::Command; use std::{ env, fs, io::{self, Read, Seek, Write}, mem, }; use biome_diagnostics::{DiagnosticExt, Error, IoError, Severity}; use ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_fs/src/fs/memory.rs
crates/biome_fs/src/fs/memory.rs
use biome_diagnostics::{Error, Severity}; use camino::{Utf8Path, Utf8PathBuf}; use parking_lot::{Mutex, RawMutex, RwLock, lock_api::ArcMutexGuard}; use rustc_hash::FxHashMap; use std::collections::hash_map::Entry; use std::io; use std::panic::{AssertUnwindSafe, RefUnwindSafe}; use std::path::PathBuf; use std::str; use ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_flags/src/lib.rs
crates/biome_flags/src/lib.rs
//! A simple implementation of feature flags. #![deny(clippy::use_self)] use biome_console::fmt::{Display, Formatter}; use biome_console::{DebugDisplay, KeyValuePair, markup}; use std::env; use std::ops::Deref; use std::sync::{LazyLock, OnceLock}; /// Returns `true` if this is an unstable build of Biome pub fn is_un...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/prelude.rs
crates/biome_graphql_formatter/src/prelude.rs
//! This module provides important and useful traits to help to format tokens and nodes //! when implementing the [crate::FormatNodeRule] trait. #![allow(unused_imports)] pub(crate) use crate::{ AsFormat, FormatNodeRule, FormattedIterExt as _, GraphqlFormatContext, GraphqlFormatter, IntoFormat, format_removed,...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/lib.rs
crates/biome_graphql_formatter/src/lib.rs
#![deny(clippy::use_self)] mod comments; pub mod context; mod cst; mod generated; mod graphql; mod prelude; mod trivia; mod utils; mod verbatim; use crate::comments::GraphqlCommentStyle; pub(crate) use crate::context::GraphqlFormatContext; use crate::context::GraphqlFormatOptions; use crate::cst::FormatGraphqlSyntaxN...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/comments.rs
crates/biome_graphql_formatter/src/comments.rs
use crate::prelude::*; use biome_diagnostics::category; use biome_formatter::comments::{ CommentKind, CommentStyle, Comments, SourceComment, is_doc_comment, }; use biome_formatter::formatter::Formatter; use biome_formatter::{FormatResult, FormatRule, write}; use biome_graphql_syntax::{GraphqlLanguage, TextLen}; use...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/cst.rs
crates/biome_graphql_formatter/src/cst.rs
use crate::prelude::*; use biome_formatter::{FormatOwnedWithRule, FormatRefWithRule, FormatResult}; use biome_graphql_syntax::{GraphqlSyntaxNode, map_syntax_node}; #[derive(Debug, Copy, Clone, Default)] pub struct FormatGraphqlSyntaxNode; impl FormatRule<GraphqlSyntaxNode> for FormatGraphqlSyntaxNode { type Conte...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/trivia.rs
crates/biome_graphql_formatter/src/trivia.rs
use crate::FormatGraphqlSyntaxToken; use crate::prelude::GraphqlFormatContext; use biome_formatter::formatter::Formatter; use biome_formatter::trivia::FormatToken; use biome_formatter::{Format, FormatResult}; use biome_graphql_syntax::GraphqlSyntaxToken; pub(crate) struct FormatRemoved<'a> { token: &'a GraphqlSynt...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/verbatim.rs
crates/biome_graphql_formatter/src/verbatim.rs
use crate::context::GraphqlFormatContext; use biome_formatter::format_element::tag::VerbatimKind; use biome_formatter::formatter::Formatter; use biome_formatter::prelude::{Tag, text}; use biome_formatter::trivia::{FormatLeadingComments, FormatTrailingComments}; use biome_formatter::{ Buffer, CstFormatContext, Forma...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/context.rs
crates/biome_graphql_formatter/src/context.rs
use crate::GraphqlCommentStyle; use biome_formatter::{AttributePosition, BracketSpacing, IndentWidth, QuoteStyle, prelude::*}; use biome_formatter::{ CstFormatContext, FormatContext, FormatOptions, IndentStyle, LineEnding, LineWidth, TransformSourceMap, }; use crate::comments::{FormatGraphqlLeadingComment, Gra...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/generated.rs
crates/biome_graphql_formatter/src/generated.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. #![allow(clippy::use_self)] #![expect(clippy::default_constructed_unit_structs)] use crate::{ AsFormat, FormatBogusNodeRule, FormatNodeRule, GraphqlFormatContext, GraphqlFormatter, IntoFormat, }; use b...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/mod.rs
crates/biome_graphql_formatter/src/graphql/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. pub(crate) mod any; pub(crate) mod auxiliary; pub(crate) mod bogus; pub(crate) mod definitions; pub(crate) mod extensions; pub(crate) mod lists; pub(crate) mod value;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/field_definition_list.rs
crates/biome_graphql_formatter/src/graphql/lists/field_definition_list.rs
use crate::prelude::*; use biome_graphql_syntax::GraphqlFieldDefinitionList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlFieldDefinitionList; impl FormatRule<GraphqlFieldDefinitionList> for FormatGraphqlFieldDefinitionList { type Context = GraphqlFormatContext; fn fmt(&self, node: &GraphqlFi...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/object_value_member_list.rs
crates/biome_graphql_formatter/src/graphql/lists/object_value_member_list.rs
use crate::prelude::*; use biome_formatter::format_args; use biome_graphql_syntax::GraphqlObjectValueMemberList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlObjectValueMemberList; impl FormatRule<GraphqlObjectValueMemberList> for FormatGraphqlObjectValueMemberList { type Context = GraphqlFormat...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/list_value_element_list.rs
crates/biome_graphql_formatter/src/graphql/lists/list_value_element_list.rs
use crate::prelude::*; use biome_formatter::format_args; use biome_graphql_syntax::GraphqlListValueElementList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlListValueElementList; impl FormatRule<GraphqlListValueElementList> for FormatGraphqlListValueElementList { type Context = GraphqlFormatCont...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/union_member_type_list.rs
crates/biome_graphql_formatter/src/graphql/lists/union_member_type_list.rs
use crate::FormatGraphqlSyntaxToken; use crate::prelude::*; use biome_formatter::trivia::FormatToken; use biome_formatter::write; use biome_graphql_syntax::{GraphqlLanguage, GraphqlNameReference, GraphqlUnionMemberTypeList}; use biome_rowan::AstSeparatedElement; #[derive(Debug, Clone, Default)] pub(crate) struct Forma...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/input_field_list.rs
crates/biome_graphql_formatter/src/graphql/lists/input_field_list.rs
use crate::prelude::*; use biome_graphql_syntax::GraphqlInputFieldList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlInputFieldList; impl FormatRule<GraphqlInputFieldList> for FormatGraphqlInputFieldList { type Context = GraphqlFormatContext; fn fmt(&self, node: &GraphqlInputFieldList, f: &mu...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/argument_definition_list.rs
crates/biome_graphql_formatter/src/graphql/lists/argument_definition_list.rs
use crate::prelude::*; use biome_formatter::write; use biome_graphql_syntax::GraphqlArgumentDefinitionList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlArgumentDefinitionList; impl FormatRule<GraphqlArgumentDefinitionList> for FormatGraphqlArgumentDefinitionList { type Context = GraphqlFormatCo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/selection_list.rs
crates/biome_graphql_formatter/src/graphql/lists/selection_list.rs
use crate::prelude::*; use biome_graphql_syntax::GraphqlSelectionList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlSelectionList; impl FormatRule<GraphqlSelectionList> for FormatGraphqlSelectionList { type Context = GraphqlFormatContext; fn fmt(&self, node: &GraphqlSelectionList, f: &mut Gra...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/definition_list.rs
crates/biome_graphql_formatter/src/graphql/lists/definition_list.rs
use crate::prelude::*; use biome_graphql_syntax::GraphqlDefinitionList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlDefinitionList; impl FormatRule<GraphqlDefinitionList> for FormatGraphqlDefinitionList { type Context = GraphqlFormatContext; fn fmt(&self, node: &GraphqlDefinitionList, f: &m...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/enum_value_list.rs
crates/biome_graphql_formatter/src/graphql/lists/enum_value_list.rs
use crate::prelude::*; use biome_graphql_syntax::GraphqlEnumValueList; #[derive(Debug, Clone, Default)] pub(crate) struct FormatGraphqlEnumValueList; impl FormatRule<GraphqlEnumValueList> for FormatGraphqlEnumValueList { type Context = GraphqlFormatContext; fn fmt(&self, node: &GraphqlEnumValueList, f: &mut Gra...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_formatter/src/graphql/lists/mod.rs
crates/biome_graphql_formatter/src/graphql/lists/mod.rs
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file. pub(crate) mod argument_definition_list; pub(crate) mod argument_list; pub(crate) mod definition_list; pub(crate) mod directive_list; pub(crate) mod directive_location_list; pub(crate) mod enum_value_list; pub...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false