Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lesson Template
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
prace-lessons
Lesson Template
Commits
8bdee9ba
Commit
8bdee9ba
authored
10 years ago
by
Raniere Silva
Browse files
Options
Downloads
Plain Diff
Merge pull request #93 from aaren/fix-blockquote-header-attributes
Fix blockquote header attributes
parents
49097cab
e6375068
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/filters/blockquote2div.py
+4
-5
4 additions, 5 deletions
tools/filters/blockquote2div.py
with
4 additions
and
5 deletions
tools/filters/blockquote2div.py
+
4
−
5
View file @
8bdee9ba
...
...
@@ -104,12 +104,11 @@ def blockquote2div(key, value, format, meta):
id
,
classes
,
kvs
=
attr
ltitle
=
pf
.
stringify
(
inlines
).
lower
()
if
ltitle
in
SPECIAL_TITLES
:
classes
.
append
(
SPECIAL_TITLES
[
ltitle
])
return
pf
.
Div
(
attr
,
blockquote
)
lowercase_title
=
pf
.
stringify
(
inlines
).
lower
()
if
lowercase_title
in
SPECIAL_TITLES
:
classes
.
append
(
SPECIAL_TITLES
[
lowercase_title
])
el
if
len
(
classes
)
==
1
and
classes
[
0
]
in
SPECIAL_CLASSES
:
if
len
(
classes
)
==
1
and
classes
[
0
]
in
SPECIAL_CLASSES
:
remove_attributes
(
blockquote
)
# a blockquote is just a list of blocks, so it can be
# passed directly to Div, which expects Div(attr, blocks)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment