Syntax highlighting #691

Злито
epsilon-phase злито 12 комітів з syntax-highlighting до master 4 роки тому
epsilon-phase прокоментував(ла) 5 роки тому (Перенесено з github.com)
Тут ще немає жодного змісту.
epsilon-phase прокоментував(ла) 5 роки тому (Перенесено з github.com)

We aren't any good at the css or the styling.

Not to mention that it needs some more work on both the css classes generated accepted, and what needs to be highlighted.

Sublime/textmate syntaxes are rather intricate.

We aren't any good at the css or the styling. Not to mention that it needs some more work on both the css classes generated accepted, and what needs to be highlighted. Sublime/textmate syntaxes are rather intricate.
igalic прокоментував(ла) 4 роки тому (Перенесено з github.com)

a general comment, if you want GitHub to properly credit you, you may wanna add the email from the commits to your github email addresses.

a general comment, if you want GitHub to properly credit you, you may wanna add the email from the commits to your github email addresses.
elegaanz (Перенесено з github.com) рецензовано 4 роки тому
elegaanz (Перенесено з github.com) додав коментар

Works fine overall, just a few remarks:

  • The .punctuation spans should probably be of the default text color (black/white depending on the theme)
  • The languages names are not obvious to guess, I had to print the list to know what names to use. A good improvement could be to make them lowercase, and replace non-alphabetic characters with - (for instance, HTML Erlang would become html-erlang). It would require you to write your own equivalent of find_syntax_by_name tho.

Here is the list of languages in case someone wants to see it:

"Plain Text",
"ASP",
"HTML (ASP)",
"ActionScript",
"AppleScript",
"Batch File",
"NAnt Build File",
"C#",
"C++",
"C",
"CSS",
"Clojure",
"D",
"Diff",
"Erlang",
"HTML (Erlang)",
"Go",
"Graphviz (DOT)",
"Groovy",
"HTML",
"Haskell",
"Literate Haskell",
"Java Server Page (JSP)",
"Java",
"JavaDoc",
"Java Properties",
"JSON",
"JavaScript",
"Regular Expressions (Javascript)",
"BibTeX",
"LaTeX Log",
"LaTeX",
"TeX",
"Lisp",
"Lua",
"Make Output",
"Makefile",
"Markdown",
"MultiMarkdown",
"MATLAB",
"OCaml",
"OCamllex",
"OCamlyacc",
"camlp4",
"Objective-C++",
"Objective-C",
"PHP Source",
"PHP",
"Pascal",
"Perl",
"Python",
"Regular Expressions (Python)",
"R Console",
"R",
"Rd (R Documentation)",
"HTML (Rails)",
"JavaScript (Rails)",
"Ruby Haml",
"Ruby on Rails",
"SQL (Rails)",
"Regular Expression",
"reStructuredText",
"Ruby",
"Cargo Build Results",
"Rust",
"SQL",
"Scala",
"Bourne Again Shell (bash)",
"Shell-Unix-Generic",
"commands-builtin-shell-bash",
"HTML (Tcl)",
"Tcl",
"Textile",
"XML",
"YAML"

Otherwise, it works fine as I said. Thank you!

Works fine overall, just a few remarks: - The `.punctuation` spans should probably be of the default text color (black/white depending on the theme) - The languages names are not obvious to guess, I had to print the list to know what names to use. A good improvement could be to make them lowercase, and replace non-alphabetic characters with `-` (for instance, `HTML Erlang` would become `html-erlang`). It would require you to write your own equivalent of `find_syntax_by_name` tho. Here is the list of languages in case someone wants to see it: <details> "Plain Text", "ASP", "HTML (ASP)", "ActionScript", "AppleScript", "Batch File", "NAnt Build File", "C#", "C++", "C", "CSS", "Clojure", "D", "Diff", "Erlang", "HTML (Erlang)", "Go", "Graphviz (DOT)", "Groovy", "HTML", "Haskell", "Literate Haskell", "Java Server Page (JSP)", "Java", "JavaDoc", "Java Properties", "JSON", "JavaScript", "Regular Expressions (Javascript)", "BibTeX", "LaTeX Log", "LaTeX", "TeX", "Lisp", "Lua", "Make Output", "Makefile", "Markdown", "MultiMarkdown", "MATLAB", "OCaml", "OCamllex", "OCamlyacc", "camlp4", "Objective-C++", "Objective-C", "PHP Source", "PHP", "Pascal", "Perl", "Python", "Regular Expressions (Python)", "R Console", "R", "Rd (R Documentation)", "HTML (Rails)", "JavaScript (Rails)", "Ruby Haml", "Ruby on Rails", "SQL (Rails)", "Regular Expression", "reStructuredText", "Ruby", "Cargo Build Results", "Rust", "SQL", "Scala", "Bourne Again Shell (bash)", "Shell-Unix-Generic", "commands-builtin-shell-bash", "HTML (Tcl)", "Tcl", "Textile", "XML", "YAML" </details> Otherwise, it works fine as I said. Thank you!
@ -6,3 +6,3 @@
apt install -y --no-install-recommends git ssh tar gzip ca-certificates default-jre&&\
apt install -y --no-install-recommends binutils-dev build-essential cmake curl gcc gettext git libcurl4-openssl-dev libdw-dev libelf-dev libiberty-dev libpq-dev libsqlite3-dev libssl-dev make openssl pkg-config postgresql postgresql-contrib python zlib1g-dev python3-pip zip unzip &&\
apt install -y --no-install-recommends binutils-dev build-essential cmake curl gcc gettext git libcurl4-openssl-dev libdw-dev libelf-dev libiberty-dev libpq-dev libsqlite3-dev libssl-dev make openssl pkg-config postgresql postgresql-contrib python zlib1g-dev python3-pip zip unzip libclang-dev&&\
rm -rf /var/lib/apt/lists/*
elegaanz (Перенесено з github.com) прокоментував(ла) 4 роки тому

This new dependency should be added to the install docs too.

This new dependency should be added to the install docs too.
elegaanz (Перенесено з github.com) прокоментував(ла) 4 роки тому

Still a TODO or not?

Still a `TODO` or not?
elegaanz (Перенесено з github.com) прокоментував(ла) 4 роки тому

I think this line was for debugging, but it should probably be removed.

I think this line was for debugging, but it should probably be removed.
elegaanz (Перенесено з github.com) прокоментував(ла) 4 роки тому

Maybe you can chain the two scan calls without calling into_iter between.

Maybe you can chain the two `scan` calls without calling `into_iter` between.
@ -34,0 +35,4 @@
"span",
[
"cw-container",
"cw-text",
elegaanz (Перенесено з github.com) прокоментував(ла) 4 роки тому

Are these lines needed? They don't seem to be related to syntax highlighting and were not here before.

Are these lines needed? They don't seem to be related to syntax highlighting and were not here before.
epsilon-phase (Перенесено з github.com) рецензовано 4 роки тому
epsilon-phase (Перенесено з github.com) прокоментував(ла) 4 роки тому

We can't think of an easy way to allow that, since it would have to be carrying state between adjacent Option<Vec<Event>>s

We can't think of an easy way to allow that, since it would have to be carrying state between adjacent `Option<Vec<Event>>`s
epsilon-phase (Перенесено з github.com) рецензовано 4 роки тому
epsilon-phase (Перенесено з github.com) прокоментував(ла) 4 роки тому

There could be more variables/highlighting to consider, but we're not much for that, so we'll take it out if you prefer.

There could be more variables/highlighting to consider, but we're not much for that, so we'll take it out if you prefer.
epsilon-phase (Перенесено з github.com) рецензовано 4 роки тому
@ -34,0 +35,4 @@
"span",
[
"cw-container",
"cw-text",
epsilon-phase (Перенесено з github.com) прокоментував(ла) 4 роки тому

Those are from the cw'd media stuff, but, since we merged it not quite right, that call was duplicated later on in the builder chain.

Those are from the cw'd media stuff, but, since we merged it not *quite* right, that call was duplicated later on in the builder chain.
trinity-1686a рецензовано 4 роки тому
trinity-1686a прокоментував(ла) 4 роки тому
Власник

not trying to use scan a second time, but flatten would look better than flat_map(into_iter)

not trying to use scan a second time, but [`flatten`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten) would look better than `flat_map(into_iter)`
codecov[bot] прокоментував(ла) 4 роки тому (Перенесено з github.com)

Codecov Report

Merging #691 into master will decrease coverage by 0.02%.
The diff coverage is 32.43%.

@@            Coverage Diff            @@
##           master    #691      +/-   ##
=========================================
- Coverage   39.32%   39.3%   -0.03%     
=========================================
  Files          72      72              
  Lines        9497    9534      +37     
  Branches     2265    2275      +10     
=========================================
+ Hits         3735    3747      +12     
- Misses       4697    4714      +17     
- Partials     1065    1073       +8
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/691?src=pr&el=h1) Report > Merging [#691](https://codecov.io/gh/Plume-org/Plume/pull/691?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/597778fd2f86139eb92ff54ea95229603d5215a9?src=pr&el=desc) will **decrease** coverage by `0.02%`. > The diff coverage is `32.43%`. ```diff @@ Coverage Diff @@ ## master #691 +/- ## ========================================= - Coverage 39.32% 39.3% -0.03% ========================================= Files 72 72 Lines 9497 9534 +37 Branches 2265 2275 +10 ========================================= + Hits 3735 3747 +12 - Misses 4697 4714 +17 - Partials 1065 1073 +8 ```
epsilon-phase (Перенесено з github.com) рецензовано 4 роки тому
epsilon-phase (Перенесено з github.com) прокоментував(ла) 4 роки тому

You mean like this?

.scan(None,flatten_text)
.flatten()
.scan(None,highlight_code)
You mean like this? ``` .scan(None,flatten_text) .flatten() .scan(None,highlight_code) ```
trinity-1686a рецензовано 4 роки тому
trinity-1686a прокоментував(ла) 4 роки тому
Власник

yes, and even

.scan(None,flatten_text)
.flatten()
.scan(None,highlight_code)
.flatten()
yes, and even ```rust .scan(None,flatten_text) .flatten() .scan(None,highlight_code) .flatten() ```
epsilon-phase (Перенесено з github.com) рецензовано 4 роки тому
epsilon-phase (Перенесено з github.com) прокоментував(ла) 4 роки тому

Can-do :)

Can-do :)
elegaanz (Перенесено з github.com) рецензовано 4 роки тому
elegaanz (Перенесено з github.com) прокоментував(ла) 4 роки тому

As you want.

As you want.
elegaanz (Перенесено з github.com) зміни затверджено 4 роки тому
elegaanz (Перенесено з github.com) додав коментар

Works great, thank you!

Works great, thank you!
igalic прокоментував(ла) 4 роки тому (Перенесено з github.com)

\o/

\o/

Рецензенти

Запит на злиття був влитиий як 458baf5f78.
Також можна переглянути інструкції для командного рядка.

Крок 1:

У репозиторії вашого проєкту перевірте нову гілку і протестуйте зміни.
git checkout -b syntax-highlighting master
git pull origin syntax-highlighting

Крок 2:

Об'єднати зміни і оновити на Forgejo.
git checkout master
git merge --no-ff syntax-highlighting
git push origin master
Підпишіться щоб приєднатися до обговорення.
Немає рецензентів
Етап відсутній
Немає виконавця
2 учасників
Сповіщення
Дата завершення
Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'.

Термін виконання не встановлений.

Залежності

No dependencies set.

Reference: Plume/Plume#691
Завантаження…
Тут ще немає жодного змісту.