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.
Bidify helps to add bidirectional text support to HTML documents.
The project is in its very early stage of development, and its interface or functionality may break from one version to another. Use it with caution.
require 'bidify'
html_input = '<p>some content even in nested format</p>'
bidified_html = Bidify.bidify_html_string(html_input)
# bidified_html: '<p dir="auto">some content even in nested format</p>'
Bidification (the dir="auto"
attribute) follows these simple rules:
li
tags.The default bidifiable tags are div
, h1
, h2
, h3
, h4
, h5
, h6
,
p
, ul
, ol
, and blockquote
. One can modify this list using options.
As a complementary step, CSS styles should use logical properties. Here are a few examples:
/* Physical properties */
text-align: left;
padding-right: 10px;
border-left: 1px;
/* Logical properties */
text-align: start;
padding-inline-end: 10px;
border-inline-start: 1px;
To use this gem with custom configuration, use the following syntax and pass options while creating an instance of bidifier:
options = {
# ...
}
bidifier = Bidify::HtmlStringBidifier.new(options)
puts bidifier.apply('<div>input stringified html</div>')
Available options with their default values are as follows:
excluding_tags: []
Removes tags from the list of bidifiable tags. This option affects the
provided tags in including_tags
options.
including_tags: []
Adds new tags to the list of bidifiable tags
greedy: false
By default, bidification stops when it reaches an element that has dir
attribute. Use true
to disregard any existing dir
attributes.
only_tags: []
It sets the bidifiable tags to the given tags.
with_table_support: false
Use true
to add table tags support.
This project is a Free/Libre and Open Source software released under LGPLv3 license.
FAQs
Unknown package
We found that bidify 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.