Merge branch 'next-minor' into develop

This commit is contained in:
Benjamin Neff 2021-09-18 19:24:20 +02:00
commit 750186319e
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
9 changed files with 31 additions and 32 deletions

View file

@ -46,11 +46,13 @@ Although the chat was never enabled per default and was marked as experimental,
* Replace uglifier with terser for JS compression [#8268](https://github.com/diaspora/diaspora/pull/8268)
## Bug fixes
* Ensure the log folder exists [#8287](https://github.com/diaspora/diaspora/pull/8287)
## Features
* Add tags to tumblr posts [#8244](https://github.com/diaspora/diaspora/pull/8244)
* Add blocks to the archive export [#8263](https://github.com/diaspora/diaspora/pull/8263)
* Allow points and dashes in the username [#8266](https://github.com/diaspora/diaspora/pull/8266)
* Add support for footnotes in markdown [#8277](https://github.com/diaspora/diaspora/pull/8277)
# 0.7.15.0

View file

@ -105,10 +105,11 @@ source "https://gems.diasporafoundation.org" do
gem "rails-assets-highlightjs", "9.12.0"
gem "rails-assets-markdown-it", "8.4.2"
gem "rails-assets-markdown-it-hashtag", "0.4.0"
gem "rails-assets-markdown-it-diaspora-mention", "1.2.0"
gem "rails-assets-markdown-it-sanitizer", "0.4.3"
gem "rails-assets-markdown-it-footnote", "3.0.3"
gem "rails-assets-markdown-it-hashtag", "0.4.0"
gem "rails-assets-markdown-it--markdown-it-for-inline", "0.1.1"
gem "rails-assets-markdown-it-sanitizer", "0.4.3"
gem "rails-assets-markdown-it-sub", "1.0.0"
gem "rails-assets-markdown-it-sup", "1.0.0"

View file

@ -569,6 +569,7 @@ GEM
rails-assets-markdown-it--markdown-it-for-inline (0.1.1)
rails-assets-markdown-it (8.4.2)
rails-assets-markdown-it-diaspora-mention (1.2.0)
rails-assets-markdown-it-footnote (3.0.3)
rails-assets-markdown-it-hashtag (0.4.0)
rails-assets-markdown-it-sanitizer (0.4.3)
rails-assets-markdown-it-sub (1.0.0)
@ -888,6 +889,7 @@ DEPENDENCIES
rails-assets-markdown-it (= 8.4.2)!
rails-assets-markdown-it--markdown-it-for-inline (= 0.1.1)!
rails-assets-markdown-it-diaspora-mention (= 1.2.0)!
rails-assets-markdown-it-footnote (= 3.0.3)!
rails-assets-markdown-it-hashtag (= 0.4.0)!
rails-assets-markdown-it-sanitizer (= 0.4.3)!
rails-assets-markdown-it-sub (= 1.0.0)!

View file

@ -16,6 +16,9 @@
typographer: true
});
var footnote = window.markdownitFootnote;
md.use(footnote);
var inlinePlugin = window.markdownitForInline;
md.use(inlinePlugin, "utf8_symbols", "text", function (tokens, idx) {
tokens[idx].content = tokens[idx].content.replace(/<->/g, "↔")

View file

@ -23,6 +23,7 @@
//= require markdown-it
//= require markdown-it-diaspora-mention
//= require markdown-it-for-inline
//= require markdown-it-footnote
//= require markdown-it-hashtag
//= require markdown-it-sanitizer
//= require markdown-it-sub

View file

@ -113,15 +113,6 @@ class PeopleController < ApplicationController
end
end
def retrieve_remote
if params[:diaspora_handle]
Workers::FetchWebfinger.perform_async(params[:diaspora_handle])
head :ok
else
head :unprocessable_entity
end
end
private
def find_person

View file

@ -181,10 +181,6 @@ Rails.application.routes.draw do
resources :photos, except: %i(new update)
get :stream
get :hovercard
collection do
post 'by_handle' => :retrieve_remote, :as => 'person_by_handle'
end
end
# Note: The contraint for this route's username parameter cannot be removed.

View file

@ -50,7 +50,9 @@ module Diaspora
end
def strip_markdown
renderer = Redcarpet::Markdown.new Redcarpet::Render::StripDown, options[:markdown_options]
# Footnotes are not supported in text-only outputs (mail, crossposts etc)
stripdown_options = options[:markdown_options].except(:footnotes)
renderer = Redcarpet::Markdown.new Redcarpet::Render::StripDown, stripdown_options
@message = renderer.render(message).strip
end
@ -119,8 +121,9 @@ module Diaspora
fenced_code_blocks: true,
space_after_headers: true,
strikethrough: true,
footnotes: true,
tables: true,
no_intra_emphasis: true,
no_intra_emphasis: true
},
markdown_render_options: {
filter_html: true,

0
log/.gitkeep Normal file
View file