diff --git a/fluffy/templates/paste.html b/fluffy/templates/paste.html
index a8437a0..f0df6a3 100644
--- a/fluffy/templates/paste.html
+++ b/fluffy/templates/paste.html
@@ -31,13 +31,27 @@
{% endblock %}
{% block text %}
-
- {{highlighter.highlight(text)|safe}}
+
+
+
+ {% for i in range(1, num_lines(text) + 1) %}
+
{{i}}
+ {% endfor %}
+
+
+ {{highlighter.highlight(text)|safe}}
+
+
+
+
+ {% for i in range(1, num_lines(text2) + 1) %}
+
{{i}}
+ {% endfor %}
+
+
+ {{highlighter2.highlight(text2)|safe}}
+
+
{% endblock %}
diff --git a/fluffy/views.py b/fluffy/views.py
index 5b73c0b..161447b 100644
--- a/fluffy/views.py
+++ b/fluffy/views.py
@@ -10,6 +10,7 @@
from fluffy import version
from fluffy.app import app
from fluffy.component.backends import get_backend
+from fluffy.component.highlighting import create_diff
from fluffy.component.highlighting import get_highlighter
from fluffy.component.highlighting import UI_LANGUAGES_MAP
from fluffy.component.styles import STYLES_BY_CATEGORY
@@ -135,6 +136,7 @@ def upload():
def paste():
"""Paste and redirect."""
text = request.form['text']
+ text2 = request.form['text2']
# Browsers always send \r\n for the pasted text, which leads to bad
# newlines when curling the raw text (#28).
transformed_text = text.replace('\r\n', '\n')
@@ -156,14 +158,18 @@ def paste():
# HTML view (Markdown or paste)
lang = request.form['language']
if lang != 'rendered-markdown':
- highlighter = get_highlighter(text, lang, None)
+ diff, diff2 = create_diff(text, text2)
+ highlighter = get_highlighter(diff, lang, None)
+ highlighter2 = get_highlighter(diff2, lang, None)
lang_title = highlighter.name
paste_obj = ctx.enter_context(
HtmlToStore.from_html(
render_template(
'paste.html',
- text=text,
+ text=diff,
+ text2=diff2,
highlighter=highlighter,
+ highlighter2=highlighter2,
raw_url=app.config['FILE_URL'].format(name=uf.name),
styles=STYLES_BY_CATEGORY,
),
diff --git a/requirements-dev-minimal.txt b/requirements-dev-minimal.txt
index b699af7..6d51ffe 100644
--- a/requirements-dev-minimal.txt
+++ b/requirements-dev-minimal.txt
@@ -5,6 +5,7 @@ ephemeral-port-reserve
gunicorn
libsass
pre-commit>=1.0
+pysass
pytest
requests
requirements-tools
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 21e0692..80894e0 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -26,13 +26,14 @@ pre-commit==2.18.1
py==1.11.0
pycparser==2.21
pyparsing==3.0.8
+pysass==0.1.0
pytest==7.1.1
PyYAML==6.0
readme-renderer==34.0
requests-toolbelt==0.9.1
requirements-tools==2.0.0
rfc3986==2.0.0
-rich==12.2.0
+rich
SecretStorage==3.3.1
toml==0.10.2
tomli==2.0.1
diff --git a/requirements.txt b/requirements.txt
index e68233b..9844851 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -40,6 +40,7 @@ Pygments==2.11.2
pygments-ansi-color==0.0.6
pygments-solarized-style==0.1
pyquery==1.4.3
+pysass==0.1.0
python-dateutil==2.8.2
requests==2.27.1
requests-oauthlib==1.3.1
@@ -47,11 +48,6 @@ rsa==4.8
s3transfer==0.5.2
setuptools==62.1.0
six==1.15.0
-tensorboard==2.8.0
-tensorboard-data-server==0.6.1
-tensorboard-plugin-wit==1.8.1
-tensorflow==2.5.0
-tensorflow-estimator==2.5.0
termcolor==1.1.0
typing-extensions==3.7.4.3
urllib3==1.26.9
diff --git a/settings/dev_files.py b/settings/dev_files.py
index c9a6e1e..c0024a3 100644
--- a/settings/dev_files.py
+++ b/settings/dev_files.py
@@ -2,8 +2,8 @@
# storage backend (how are the files stored after being uploaded?)
STORAGE_BACKEND = {
'name': 'file',
- 'object_path': 'tmp/object/{name}',
- 'html_path': 'tmp/html/{name}',
+ 'object_path': '/Users/MantasSkackauskas/Documents/fluffy/tmp/object/{name}',
+ 'html_path': '/Users/MantasSkackauskas/Documents/fluffy/tmp/html/{name}',
}
# branding