Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
muppet-strings
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Hugo Hörnquist
muppet-strings
Commits
24e5ad00
Commit
24e5ad00
authored
1 year ago
by
Hugo Hörnquist
Browse files
Options
Downloads
Patches
Plain Diff
Don't render non-markdown files.
parent
697f456b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
muppet/output.py
+6
-1
6 additions, 1 deletion
muppet/output.py
with
6 additions
and
1 deletion
muppet/output.py
+
6
−
1
View file @
24e5ad00
...
...
@@ -8,6 +8,7 @@ import os
import
os.path
import
pathlib
import
json
import
html
from
.gather
import
ModuleEntry
from
jinja2
import
(
Environment
,
...
...
@@ -378,7 +379,11 @@ def setup_module(base: str, module: ModuleEntry, *, path_base: str) -> None:
pathlib
.
Path
(
os
.
path
.
join
(
path
,
name
)).
mkdir
(
exist_ok
=
True
)
out_path
=
os
.
path
.
join
(
path
,
name
,
'
index.html
'
)
content
=
markdown
(
raw_content
)
if
filename
.
endswith
(
'
.md
'
):
content
=
markdown
(
raw_content
)
else
:
content
=
'
<pre>
'
+
html
.
escape
(
raw_content
)
+
'
</pre>
'
template
=
jinja
.
get_template
(
'
content.html
'
)
crumbs
=
breadcrumbs
((
'
Environment
'
,
''
),
module
.
name
,
...
...
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