-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[uss_qualifier] Clean up NetRID requirements (#245)
* Clean up F3411-22a requirements Check and format included test scenario steps * Fix NET0260 in v19
- Loading branch information
1 parent
29377b1
commit 1e42d08
Showing
50 changed files
with
1,330 additions
and
864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import marko.element | ||
|
||
|
||
def text_of(parent: marko.element.Element) -> str: | ||
if not hasattr(parent, "children"): | ||
return "" | ||
if isinstance(parent.children, str): | ||
return parent.children | ||
return "".join(text_of(c) for c in parent.children) | ||
def text_of(value: marko.element.Element) -> str: | ||
"""Gets the plain text contained within a Markdown element""" | ||
if isinstance(value, str): | ||
return value | ||
elif isinstance(value, marko.block.BlockElement): | ||
result = "" | ||
for child in value.children: | ||
result += text_of(child) | ||
return result | ||
elif isinstance(value, marko.inline.InlineElement): | ||
if isinstance(value, marko.inline.LineBreak): | ||
return "\n" | ||
if isinstance(value.children, str): | ||
return value.children | ||
result = "" | ||
for child in value.children: | ||
result += text_of(child) | ||
return result | ||
else: | ||
raise NotImplementedError( | ||
"Cannot yet extract raw text from {}".format(value.__class__.__name__) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.