Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
65b83029
Commit
65b83029
authored
May 29, 2020
by
Minerva and her owl
Committed by
Paul Slaughter
May 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AsciiDoc: Add support for built-in alignment roles
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32928
parent
2eb346c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
app/assets/stylesheets/framework/typography.scss
app/assets/stylesheets/framework/typography.scss
+18
-0
changelogs/unreleased/asciidoc-alignment-roles.yml
changelogs/unreleased/asciidoc-alignment-roles.yml
+5
-0
lib/banzai/filter/ascii_doc_sanitization_filter.rb
lib/banzai/filter/ascii_doc_sanitization_filter.rb
+2
-1
No files found.
app/assets/stylesheets/framework/typography.scss
View file @
65b83029
...
...
@@ -545,6 +545,24 @@
}
}
}
/* AsciiDoc(tor) built-in alignment roles */
.text-left
{
text-align
:
left
!
important
;
}
.text-right
{
text-align
:
right
!
important
;
}
.text-center
{
text-align
:
center
!
important
;
}
.text-justify
{
text-align
:
justify
!
important
;
}
}
/**
...
...
changelogs/unreleased/asciidoc-alignment-roles.yml
0 → 100644
View file @
65b83029
---
title
:
'
AsciiDoc:
Add
support
for
built-in
alignment
roles.'
merge_request
:
32928
author
:
mnrvwl
type
:
fixed
lib/banzai/filter/ascii_doc_sanitization_filter.rb
View file @
65b83029
...
...
@@ -18,6 +18,7 @@ module Banzai
# Classes used by Asciidoctor to style components
ADMONITION_CLASSES
=
%w(fa icon-note icon-tip icon-warning icon-caution icon-important)
.
freeze
ALIGNMENT_BUILTINS_CLASSES
=
%w(text-center text-left text-right text-justify)
.
freeze
CALLOUT_CLASSES
=
[
'conum'
].
freeze
CHECKLIST_CLASSES
=
%w(fa fa-check-square-o fa-square-o)
.
freeze
LIST_CLASSES
=
%w(checklist none no-bullet unnumbered unstyled)
.
freeze
...
...
@@ -28,7 +29,7 @@ module Banzai
ELEMENT_CLASSES_WHITELIST
=
{
span:
%w(big small underline overline line-through)
.
freeze
,
div:
[
'admonitionblock'
].
freeze
,
div:
ALIGNMENT_BUILTINS_CLASSES
+
[
'admonitionblock'
].
freeze
,
td:
[
'icon'
].
freeze
,
i:
ADMONITION_CLASSES
+
CALLOUT_CLASSES
+
CHECKLIST_CLASSES
,
ul:
LIST_CLASSES
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment