question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include nested parse for `ref` role text

See original GitHub issue

Describe the bug {ref}`*vectorization* <sec:vectorization>` should result in “vectorization” as a link and italicized. The current result is:

<a class="reference internal" href="ch1.html#sec-vectorization"><span class="std std-ref">*vectorization*</span></a>.</p>

To Reproduce To use an example already at hand:

  1. Open to docs/examples/wealth_dynamics_md.md
  2. Modify the area around line 56 to add a label and a reference:
(sec:lorenz)=                                                                   
## Lorenz Curves and the Gini Coefficient                                       
                                                                                
Here is a reference to {ref}`*Lorenz* <sec:lorenz>`, with emphasis!
  1. Navigate to docs/ and build: make html
  2. View the output: <browser> _build/html/examples/wealth_dynamics_md.html

Expected behavior The emphasis syntax within a role should result in a functioning link that is also italicized.

Screenshots N/A

Environment (please complete the following information):

  • Python Version [e.g. 3.7.1] 3.8.2
  • Package Version [e.g. 0.1.0] MyST-Parser 0.5.1

Additional context I noticed that tests/test_syntax/test_ast.py has a test_role which appears to test internal emphasis. I’m not as familiar with pytest as I need to be, so I had trouble parsing the test suite to figure out exactly what was happening - either way, it doesn’t appear the test covers the full conversion from MyST syntax->HTML.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, May 31, 2020

It seems markup is now correctly rendered in markdown-style links

only for external links, see #152

0reactions
akhmerovcommented, May 31, 2020

It seems markup is now correctly rendered in markdown-style links. Since the ref-style links are probably wontfix, should this issue be closed?

[I am **bold** and mathy $\int$](https://example.com)

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to parse through nested column in text file in a shell script
I have a text file that has the following format: group A: red team: worker 1, worker 2. green team: worker 2, worker...
Read more >
Core Syntax - MyST-Parser - Read the Docs
The text will be parsed as nested Markdown, for example [here's some *emphasised text*](https://example.com) will be parsed as here's some emphasised text. ...
Read more >
GitLab CI/CD include examples
Nested includes can include the same configuration file. ... When used in include , the CI_COMMIT_REF_NAME variable returns the full ref path, ...
Read more >
reStructuredText Directives - Docutils
Parse the included content with the specified parser. (New in Docutils 0.17). literalflag (empty). The entire included text is inserted into the document...
Read more >
reStructuredText Primer - Sphinx documentation
The paragraph (ref) is the most basic block in a reST document. Paragraphs are simply chunks of text separated by one or more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found