Comments (8)
I'm not positive, but it seems the extension only parses .rst
:
emojicodes/sphinxemoji/sphinxemoji.py
Line 55 in ec8f49d
where as it should support everything in source_suffix?
from emojicodes.
Thanks for your suggestion @meri-burgess! 😊
Could you elaborate a bit more on your use case? I'm guessing you use an extension in Sphinx to support Markdown. If so, which one? Does it support variable substitutions like |release|
, |version|
?
from emojicodes.
In markdown, you can use eval-rst
:
```{eval-rst}
|:white_check_mark:| hacky
```
to get:
✅ hacky
from emojicodes.
Yes and I suppose the .md
syntax would be [:smile:]
or [](:smile:)
from emojicodes.
myst-parser automatically adds .md
to source_suffx
: https://github.com/executablebooks/MyST-Parser/blob/ebf989fdae10c68dfbd3dcdfec4b86259b810cd9/myst_parser/sphinx_ext/main.py#L34
The problem isn't the syntax to be parsed, its the suffix (extension) of the files to be parsed.
from emojicodes.
yes I know, I was just commenting on what the future PR should probably support in terms of UX (in response to this) :)
from emojicodes.
I am interested in trying to completely swap rst
for md
(I have no .rst
files, only .md
files).
I tried this:
apt-get update && apt-get install git -y
git clone https://github.com/sphinx-contrib/emojicodes.git ../emojicodes
sed -i "s/rst/md/" ../emojicodes/sphinxemoji/sphinxemoji.py
cat ../emojicodes/sphinxemoji/sphinxemoji.py
pip install build
python -m build ../emojicodes
pip install ../emojicodes/dist/*.whl
It successfully replaces rst
with md
+ loads the extension in to Sphinx, but unfortunately still doesn't want to display emojis.
I am using the myst_parser
extension to parse Markdown, which supports substitution.
In conf.py
I have myst_enable_extensions = ['substitution']
In the .md
file I have tried:
:white_check_mark:
[:white_check_mark:]
|:white_check_mark:|
{{:white_check_mark:}}
{{white_check_mark}}
{{"a" + "b"}}
```{eval-rst}
|:white_check_mark:|
```
Myst uses {{ .. }}
as delimiters, but the delimiter is configurable.
The ones inside {{ .. }}
in my list/code block above are replaced with blank strings, except "a" + "b"
which successfully replaces to ab
. The {eval-rst}
still continues to show the emoji unexpectedly though.
Usually Myst expects you to feed it a list of substitutions in the conf.py
or in the .md
file.
Any help is much appreciated please!
See also: Stack Overflow question
Many thanks
from emojicodes.
@dannybeckett I haven't had the time to look at this, but I'd be happy to review and integrate a PR if someone is able to implement it. 😊
from emojicodes.
Related Issues (20)
- Transfer to `sphinx-contrib`? HOT 10
- How to use it inside table ? HOT 3
- Document list of supported emoji styles HOT 1
- Test documentation
- Add tests to CI
- OpenMoji
- RemovedInSphinx40Warning: The app.add_javascript() is deprecated HOT 2
- Document coding scheme used HOT 5
- Output in Latex HOT 8
- Get rid of asterisk warnings HOT 2
- Support colored emojis in PDF output HOT 1
- 0.1.9: sphinx 4.2 warnings HOT 5
- Please include the LICENSE file in the pypi tar HOT 2
- How do you feel about a theme enabling this extension for *all* its users? HOT 1
- Missing some emoji codes/aliases HOT 1
- 0.2.0: `emojicodes` has install time `setuptools` dependency HOT 4
- Guidance to add it to readthedocs HOT 4
- PosixPath problem and 0.3.0 HOT 4
- 'charmap' codec can't decode byte X in position Y: character maps to <undefined> HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emojicodes.