Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProB 2 Jupyter Kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
ProB 2 Jupyter Kernel
Commits
1cc75071
Commit
1cc75071
authored
Jun 18, 2018
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Use standard MIMETYPE.TEXT_MARKDOWN constant instead of our own
parent
28932b05
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/prob2/jupyter/ProBKernel.java
+2
-3
2 additions, 3 deletions
src/main/java/de/prob2/jupyter/ProBKernel.java
with
2 additions
and
3 deletions
src/main/java/de/prob2/jupyter/ProBKernel.java
+
2
−
3
View file @
1cc75071
...
@@ -55,7 +55,6 @@ public final class ProBKernel extends BaseKernel {
...
@@ -55,7 +55,6 @@ public final class ProBKernel extends BaseKernel {
private
static
final
@NotNull
Pattern
COMMAND_PATTERN
=
Pattern
.
compile
(
"\\s*(\\:[^\\s]*)(?:\\h*(.*))?"
,
Pattern
.
DOTALL
);
private
static
final
@NotNull
Pattern
COMMAND_PATTERN
=
Pattern
.
compile
(
"\\s*(\\:[^\\s]*)(?:\\h*(.*))?"
,
Pattern
.
DOTALL
);
private
static
final
@NotNull
Pattern
BSYMB_COMMAND_PATTERN
=
Pattern
.
compile
(
"\\\\([a-z]+)"
);
private
static
final
@NotNull
Pattern
BSYMB_COMMAND_PATTERN
=
Pattern
.
compile
(
"\\\\([a-z]+)"
);
private
static
final
@NotNull
MIMEType
MARKDOWN_MIME_TYPE
=
MIMEType
.
parse
(
"text/markdown"
);
private
static
final
@NotNull
Map
<
@NotNull
String
,
@NotNull
String
>
BSYMB_COMMAND_DEFINITIONS
;
private
static
final
@NotNull
Map
<
@NotNull
String
,
@NotNull
String
>
BSYMB_COMMAND_DEFINITIONS
;
static
{
static
{
...
@@ -181,9 +180,9 @@ public final class ProBKernel extends BaseKernel {
...
@@ -181,9 +180,9 @@ public final class ProBKernel extends BaseKernel {
throw
new
CommandExecutionException
(
name
,
e
);
throw
new
CommandExecutionException
(
name
,
e
);
}
}
if
(
result
!=
null
&&
result
.
hasDataForType
(
M
ARKDOWN_MIME_TYPE
))
{
if
(
result
!=
null
&&
result
.
hasDataForType
(
M
IMEType
.
TEXT_MARKDOWN
))
{
// Add definitions for any used bsymb LaTeX commands to Markdown output.
// Add definitions for any used bsymb LaTeX commands to Markdown output.
final
String
markdown
=
(
String
)
result
.
getData
(
M
ARKDOWN_MIME_TYPE
);
final
String
markdown
=
(
String
)
result
.
getData
(
M
IMEType
.
TEXT_MARKDOWN
);
final
StringBuilder
defs
=
new
StringBuilder
();
final
StringBuilder
defs
=
new
StringBuilder
();
final
Matcher
matcher
=
BSYMB_COMMAND_PATTERN
.
matcher
(
markdown
);
final
Matcher
matcher
=
BSYMB_COMMAND_PATTERN
.
matcher
(
markdown
);
while
(
matcher
.
find
())
{
while
(
matcher
.
find
())
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment