Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Makeup provides markup rendering and syntax highlighting in one glorious package. It can also syntax highlight "fenced code blocks" in markdown files.
Makeup
does all its heavylifting through GitHub::Markup
and Pygments.rb
,
and combines the two for killer code blocks in markup files.
Rendering markup is done through Makeup::Markup
. For information about markup
formats, what gems to install for various format support etc see the
GitHub::Markup
docs.
require "makeup"
Makeup::Markup.new.render("file.md", "# Some markdown")
GitHub::Markup
uses the file name to decide what markup format to render the
contents with.
To extract and syntax highlight "fenced code blocks" with Pygments, give the markup renderer a highlighter:
require "makeup"
highlighter = Makeup::SyntaxHighlighter.new
renderer = Makeup::Markup.new(:highlighter => highlighter)
renderer.render("file.md", <<MD)
# Documentation and examples
## s-trim `(s)`
Remove whitespace at the beginning and end of `s`.
\`\`\`cl
(s-trim "trim ") ;; => "trim"
(s-trim " this") ;; => "this"
(s-trim " only trims beg and end ") ;; => "only trims beg and end"
\`\`\`
MD
The fenced code block will be syntax highlighted with the common lisp lexer.
Makeup
provides a very thin abstraction around Pygments.rb
for syntax
highlighting:
require "makeup"
highlighter = Makeup::SyntaxHighlighter.new
res = highlighter.highlight(person.rb", <<RUBY)
class Person
def speak
"Hello"
end
end
RUBY
res.lexer # "ruby"
res.code # HTML-formatted syntax highlighted code
FAQs
Unknown package
We found that makeup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.