Age | Commit message (Collapse) | Author |
|
|
|
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
|
|
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
|
|
These instances were detected by searching for files that include
AK/Format.h, but don't match the regex:
\\b(CheckedFormatString|critical_dmesgln|dbgln|dbgln_if|dmesgln|FormatBu
ilder|__FormatIfSupported|FormatIfSupported|FormatParser|FormatString|Fo
rmattable|Formatter|__format_value|HasFormatter|max_format_arguments|out
|outln|set_debug_enabled|StandardFormatter|TypeErasedFormatParams|TypeEr
asedParameter|VariadicFormatParams|v_critical_dmesgln|vdbgln|vdmesgln|vf
ormat|vout|warn|warnln|warnln_if)\\b
(Without the linebreaks.)
This regex is pessimistic, so there might be more files that don't
actually use any formatting functions.
Observe that this revealed that Userland/Libraries/LibC/signal.cpp is
missing an include.
In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
|
|
|
|
This removes one FIXME :^)
|
|
With this patch, the blocks in a markdown document render a vector of
lines. These lines get concatenated in Document::render_to_terminal, so
this does not change any external APIs of LibMarkdown.
This change makes it possible to indent individual lines in the rendered
markdown. So, rendering blockquotes in a similar way to code blocks :^)
|
|
When parsing a code block not in a section (in a file without a
heading), the parser would initialize the code block with an
uninitialized (invalid) value for current_section. Accessing this value
would later cause a segmentation fault in render_to_terminal.
|
|
The library logs the error and falls back to not colorizing the js code
inside the block instead.
|
|
|
|
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.
One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
|
|
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.
Also included are changes to readd now missing dependencies to tools
that actually need them.
|
|
|
|
This lets users supply custom styling and scripting, among other things.
|
|
Also make clang-tidy happy by making line a const&
|
|
The escape sequence to color a section's name was separated
by a newline from the section's name, making less(1) trim
the escape sequence off when the section's name was on the
first line.
|
|
|
|
This implements the image size extension that's quite commonly used:
https://github.com/commonmark/commonmark-spec/wiki/Deployed-Extensions#image-size
This supports specifying...
Both width and height: ![](foo.png =100x200)
Width only: ![](foo.png =100x)
Height only: ![](foo.png =x200)
The size is always in pixels (relative sizing does not seem
to be spec'd anywhere).
|
|
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).
No functional changes.
|
|
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).
No functional changes.
|
|
Using ~~text~~ syntax will strike out the text between the two tildes.
Only missing portion is the terminal rendering of strike through text.
The ansi escape codes for strike through text are \e[9m and \e[29m but
it appears the terminal does not support these. Please correct me if I
am wrong.
I tested that the render_to_terminal function was being called by giving
it bold ANSI escape codes, and that did work so the function is being
called correctly.
|
|
HoriziontalRule -> HorizontalRule
|
|
|
|
This doesn't actually matter, but I'm trying to match the commonmark
test cases where possible.
|
|
- Support tildes.
- Support different lengths of fence.
- Begrudgingly keep support for serenities one markdown extension.
|
|
|
|
|
|
also fix a conflict with lists and thematic breaks
|
|
|
|
|
|
|
|
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
|
|
This patch adds color formatting to markdown viewed in the terminal.
This also increases readability.
|
|
This patch adds spacing to give a sense of structure to markdown
documents viewed in the terminal. This also makes the content easier
to read.
|
|
|
|
Previously, only terminal output aligned table column contents
correctly. Now, we apply a `text-align` to each cell. This does not
actually *work* however, since LibWeb's table layout code is not yet
fully functional.
|
|
|
|
This fixes an issue where the linked images in our README.md didn't
get turned into images.
|
|
This also improves Commonmark coverage, e.g. it fixes tests
HTML_blocks_ex179_2894..2906 and Lists_ex308_5439..5457.
In other words, we go from 271 out of 652 to 273 out of 652.
|
|
|
|
This already was the case in some sense, but made it very inconvenient
to access it.
|
|
Before this patch the markdown lists would have two space inbetween each
item. This patch removes one of these newlines for a nicer render.
|
|
|
|
This patch adds contexts to line iterator for nesting list items and
blockquotes. It also incidentally makes the api for LineIterator
simpler, and will make it easier to add other containers in the future.
|
|
5. hey -> <ol start="5"><li>hey</li></ol>
|
|
also allow '+' as an unordered list marker
|
|
From the commonmark spec:
A list is loose if any of its constituent list items are separated by
blank lines, or if any of its constituent list items directly contain
two block-level elements with a blank line between them. Otherwise a
list is tight. (The difference in HTML output is that paragraphs in a
loose list are wrapped in <p> tags, while paragraphs in a tight list are
not.)
|
|
|