Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
d39ece18
Commit
d39ece18
authored
Dec 28, 2018
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make rst2md runnable and update changelog
parent
fe2d715f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
ChangeLog.rst
ChangeLog.rst
+3
-3
support/rst2md.py
support/rst2md.py
+9
-1
No files found.
ChangeLog.rst
View file @
d39ece18
...
@@ -180,8 +180,8 @@
...
@@ -180,8 +180,8 @@
`@DarkDimius (Dmitry Petrashko) <https://github.com/DarkDimius>`_,
`@DarkDimius (Dmitry Petrashko) <https://github.com/DarkDimius>`_,
`@HecticSerenity <https://github.com/HecticSerenity>`_.
`@HecticSerenity <https://github.com/HecticSerenity>`_.
* Added
`pkgconfig`
support which makes it easier to consume the library from
* Added
pkgconfig
support which makes it easier to consume the library from
`meson`
and other build systems
meson
and other build systems
(`#916 <https://github.com/fmtlib/fmt/pull/916>`_).
(`#916 <https://github.com/fmtlib/fmt/pull/916>`_).
Thanks `@colemickens (Cole Mickens) <https://github.com/colemickens>`_.
Thanks `@colemickens (Cole Mickens) <https://github.com/colemickens>`_.
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
`@hotwatermorning <https://github.com/hotwatermorning>`_,
`@hotwatermorning <https://github.com/hotwatermorning>`_,
`@Zefz (JohanJansen) <https://github.com/Zefz>`_.
`@Zefz (JohanJansen) <https://github.com/Zefz>`_.
* Improved `
string_view
` construction performance
* Improved `
`string_view`
` construction performance
(`#914 <https://github.com/fmtlib/fmt/pull/914>`_).
(`#914 <https://github.com/fmtlib/fmt/pull/914>`_).
Thanks `@gabime (Gabi Melman) <https://github.com/gabime>`_.
Thanks `@gabime (Gabi Melman) <https://github.com/gabime>`_.
...
...
support/rst2md.py
100644 → 100755
View file @
d39ece18
#!/usr/bin/env python
# reStructuredText (RST) to GitHub-flavored Markdown converter
# reStructuredText (RST) to GitHub-flavored Markdown converter
import
re
import
re
,
sys
from
docutils
import
core
,
nodes
,
writers
from
docutils
import
core
,
nodes
,
writers
...
@@ -35,6 +36,9 @@ class Translator(nodes.NodeVisitor):
...
@@ -35,6 +36,9 @@ class Translator(nodes.NodeVisitor):
self
.
version
=
re
.
match
(
r'(\d+\.\d+\.\d+).*'
,
node
.
children
[
0
]).
group
(
1
)
self
.
version
=
re
.
match
(
r'(\d+\.\d+\.\d+).*'
,
node
.
children
[
0
]).
group
(
1
)
raise
nodes
.
SkipChildren
raise
nodes
.
SkipChildren
def
visit_title_reference
(
self
,
node
):
raise
Exception
(
node
)
def
depart_title
(
self
,
node
):
def
depart_title
(
self
,
node
):
pass
pass
...
@@ -149,3 +153,7 @@ class MDWriter(writers.Writer):
...
@@ -149,3 +153,7 @@ class MDWriter(writers.Writer):
def
convert
(
rst_path
):
def
convert
(
rst_path
):
"""Converts RST file to Markdown."""
"""Converts RST file to Markdown."""
return
core
.
publish_file
(
source_path
=
rst_path
,
writer
=
MDWriter
())
return
core
.
publish_file
(
source_path
=
rst_path
,
writer
=
MDWriter
())
if
__name__
==
'__main__'
:
convert
(
sys
.
argv
[
1
])
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