Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Show more breadcrumbs
TO
Maják
Commits
097b8879
Commit
097b8879
authored
3 years ago
by
OndraRehounek
Committed by
jan.bednarik
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
jekyll-import: clear md from html
parent
caf81e4a
Branches
Branches containing commit
No related tags found
2 merge requests
!487
Release
,
!483
jekyll import: html tags in MD
Pipeline
#7870
passed
3 years ago
Stage: build
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/jekyll_import.py
+3
-1
3 additions, 1 deletion
shared/jekyll_import.py
with
3 additions
and
1 deletion
shared/jekyll_import.py
+
3
−
1
View file @
097b8879
...
@@ -14,6 +14,7 @@ from typing import List
...
@@ -14,6 +14,7 @@ from typing import List
from
urllib.error
import
HTTPError
from
urllib.error
import
HTTPError
from
uuid
import
uuid4
from
uuid
import
uuid4
import
bleach
import
markdown.serializers
import
markdown.serializers
import
yaml
import
yaml
from
django.core.files.images
import
ImageFile
from
django.core.files.images
import
ImageFile
...
@@ -571,7 +572,8 @@ class JekyllArticleImporter:
...
@@ -571,7 +572,8 @@ class JekyllArticleImporter:
except
(
Page
.
DoesNotExist
,
Page
.
MultipleObjectsReturned
):
except
(
Page
.
DoesNotExist
,
Page
.
MultipleObjectsReturned
):
article
=
self
.
page_model
()
article
=
self
.
page_model
()
md
=
r
[
2
]
md
=
r
[
2
]
# "raw" markdown z postu
md
=
bleach
.
clean
(
md
)
# očistíme o případné nechtěné HTML tagy
html
=
html_md
.
convert
(
md
)
html
=
html_md
.
convert
(
md
)
article
.
perex
=
self
.
get_perex
(
md
)
or
"
...
"
article
.
perex
=
self
.
get_perex
(
md
)
or
"
...
"
self
.
handle_content
(
article
,
meta
,
html
)
self
.
handle_content
(
article
,
meta
,
html
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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