Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support building line blocks with markdown-it hardbreaks#948

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jdknight wants to merge1 commit intoexecutablebooks:master
base:master
Choose a base branch
Loading
fromjdknight:hardbreaks-into-lineblocks

Conversation

jdknight
Copy link

Provides the ability to build docutils' line-block nodes if an inline element contains hardbreaks. When a hardbreak is detected as a child of an inline token, a line-block will be created and child tokens will be rendered into a prepared line node. Child nodes are placed into a line node until the next hardbreak is detected, where a new line node is created to hold the next child set. The process repeats until all children are processed.


This change is in relation to#877. The change should allow any translator type to handle these line breaks, without requiring the raw directive.

With a document:

#TestPATH        to be explained\PYTHONPATH  to be explained\GRUB        to be explained

Example renderings:

(HTML)
image

(PDF)
image

(Confluence)
image

@codecovCodecov
Copy link

codecovbot commentedJul 20, 2024
edited
Loading

Codecov Report

Attention: Patch coverage is96.29630% with1 line in your changes missing coverage. Please review.

Project coverage is 90.14%. Comparing base(d3d7fbb) to head(08f1afa).

FilesPatch %Lines
myst_parser/mdit_to_docutils/base.py96.29%1 Missing⚠️
Additional details and impacted files
@@           Coverage Diff           @@##           master     #948   +/-   ##=======================================  Coverage   90.14%   90.14%           =======================================  Files          24       24             Lines        3418     3441   +23     =======================================+ Hits         3081     3102   +21- Misses        337      339    +2
FlagCoverage Δ
pytests90.14% <96.29%> (+<0.01%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

Provides the ability to build docutils' line-block nodes if an inlineelement contains hardbreaks. When a hardbreak is detected as a child ofan inline token, a line-block will be created and child tokens will berendered into a prepared line node. Child nodes are placed into a linenode until the next hardbreak is detected, where a new line node iscreated to hold the next child set. The process repeats until allchildren are processed.Signed-off-by: James Knight <git@jdknight.me>
@jdknightjdknightforce-pushed thehardbreaks-into-lineblocks branch fromd1990c5 to1873066CompareFebruary 1, 2025 17:42
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@jdknight

[8]ページ先頭

©2009-2025 Movatter.jp