New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve parsing of composite inline blocks #66
Conversation
@choldgraf since this is a change to the core parsing algorithm, before merging, we should read carefully through the CircleCI artefacts, to check for any unexpected behaviour not picked up by the unit tests. |
Differences noted between 'Wealth Distribution Dynamics' examples:
|
|
that is quite strange that RTD has different behavior from Circle (circle looks fine to me FWIW). Perhaps that's something unrelated to this PR that we should figure out in a different issue? I wonder if RTD is loading (or not loading) some kind of asset that is different in CircleCI. Or, it could be that RTD is using a different version of Sphinx (if I remember it uses an older 1.X version) |
That would be my first thought as well. Maybe you can force RTD to use a newer version of sphinx? I'm sure I've done something like this before, by using Conda. |
yep, I think you can specify it in RTD.yml, I'll try it in another PR to see if that fixes it (may do some self-merging since we don't get the build results until it's merged) |
You can add/activate extra repo branches for RTD to build in the |
hmmm, actually I take it back, our |
OK I think it has to do with the Sphinx theme we're using, I opened up #68 to track it |
Anyway, I'm happy to merge this PR now, if you are? |
Figure out why equation referencing didn't work | ||
``` | ||
Euler's identity, equation {DOESN'T WORKeq}`euler`, was elected one of the | ||
Euler's identity, equation {math:numref}`euler`, was elected one of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yessss
"For example, `$x_{hey}=it+is^{math}$` renders $x_{hey}=it+is^{math}$.", | ||
], | ||
), | ||
("in_link_content", ["[$a$](link)"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
embedding equations inside links...this is some power-user stuff right here ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for the improvement, it's good to see multi-part roles working now!
fixes #51, where for example a
$
within a code span was causing issues for later math blocks, i.e. for.Only a math block between the first and second dollar sign was being recognised as potential math (overriden in priority by the code block), since the math block regex was run once per paragraph.
Now the algorithm looks for the first span block match (code block or math block) and, if a block is found, records that block, advances the cursor position to the end of the block, and recomputes the next block.